Skip to content

Commit 7cf23aa

Browse files
committed
fix Util's markJsFunction function of checking '=>' exist
1 parent 78dee2a commit 7cf23aa

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## Version 6.2.0
4+
1. Fix Utility's arrayToDatastore function when there's only one column.
5+
2. Update Google chart to use Date type in X axis for zoom option to work.
6+
37
## Version 6.1.0
48
1. Fix dynamic properties in PHP 8.2.
59
2. Fix mull meta column key in core/Table widget.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "koolreport/core",
3-
"version":"6.1.0",
3+
"version":"6.2.0",
44
"description": "An Open Source PHP Reporting Framework for easier and faster report delivery.",
55
"keywords": ["php reporting framework","php reporting tools","data processing","data visualization","charts and graphs"],
66
"homepage": "https://www.koolreport.com",

src/core/Utility.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,10 @@ public static function markJsFunction(&$obj, &$marks = array())
226226
) $isJsFunction = true;
227227
if (
228228
strpos($tsv, "(") === 0
229-
&& strpos($tsv, "=>") !== -1
230-
) $isJsFunction = true;
229+
&& strpos($tsv, "=>") !== false
230+
) {
231+
$isJsFunction = true;
232+
}
231233
if ($isJsFunction) {
232234
$marks[] = trim($v);
233235
$obj[$k] = "--js(" . (count($marks) - 1) . ")";

src/datasources/PdoDataSource.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,10 @@ protected function guessTypeFromValue($value)
426426
protected function buildMetaData()
427427
{
428428
// echo "pdodatasource buildMetaData<br>";
429+
430+
// $this->connection->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);
431+
// $this->connection->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_BOTH);
432+
429433
$metaData = array("columns" => array());
430434

431435
if (empty($this->sqlParams)) $this->sqlParams = [];
@@ -562,6 +566,9 @@ public function start()
562566
{
563567
// echo "pdodatasource start()<br>";
564568

569+
// $this->connection->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);
570+
// $this->connection->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_NUM);
571+
565572
$this->buildMetaData();
566573
$this->sendMeta($this->builtMetaData, $this);
567574

0 commit comments

Comments
 (0)