dblayeroo: the post execute select must not convert a NULL to INT if a column definition is INTEGER

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4004 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-11-30 10:57:29 +00:00
parent 4fccb57e7a
commit a80a51c862
2 changed files with 3 additions and 3 deletions

View File

@@ -532,7 +532,7 @@ class test_dblayeroo_{ENGINE} extends PHPUnit_Framework_TestCase
'groupedoo.object' => 'object',
'groupedoo.where' => 'where',
'groupedoo.with space' => NULL,
'usersoo.uid' => 0,
'usersoo.uid' => NULL,
'usersoo.gecos' => NULL,
'usersoo.password' => NULL,
'usersoo.group' => NULL,

View File

@@ -2882,8 +2882,8 @@ class dblayeroo
if ($pos)
$name = substr ($columns[$colNb], 0, $pos);
$name = str_replace ("DISTINCT ", "", $name);
if (strtolower ($fieldsAll[$name][0]) ===
"integer")
if (strtolower ($fieldsAll[$name][0]) === "integer" &&
$val !== null)
$val = intval ($val);
}
if (($pos = strpos ($columns[$colNb], " AS ".$this->sep)) !== false)