diff --git a/Tests/dblayerooComplet.php b/Tests/dblayerooComplet.php index 38639bd..716fd44 100644 --- a/Tests/dblayerooComplet.php +++ b/Tests/dblayerooComplet.php @@ -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, diff --git a/dblayeroo.php b/dblayeroo.php index 5129133..84beb69 100644 --- a/dblayeroo.php +++ b/dblayeroo.php @@ -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)