Skip to content

Commit a109005

Browse files
committed
Merge pull request #246 from avbdr/master
Fix for #245: correctly treat '0' values
2 parents bc28639 + 03e5d76 commit a109005

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

MysqliDb.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ protected function _buildWhere () {
911911
$this->_bindParams ($val);
912912
else if ($val === null)
913913
$this->_query .= $operator . " NULL";
914-
else if ($val != 'DBNULL')
914+
else if ($val != 'DBNULL' || $val == '0')
915915
$this->_query .= $this->_buildPair ($operator, $val);
916916
}
917917
}
@@ -1028,7 +1028,7 @@ protected function replacePlaceHolders ($str, $vals) {
10281028
$val = $vals[$i++];
10291029
if (is_object ($val))
10301030
$val = '[object]';
1031-
if ($val == NULL)
1031+
if ($val === NULL)
10321032
$val = 'NULL';
10331033
$newStr .= substr ($str, 0, $pos) . "'". $val . "'";
10341034
$str = substr ($str, $pos + 1);

0 commit comments

Comments
 (0)