Skip to content

Commit df1b0b9

Browse files
committed
Merge pull request #305 from avbdr/master
Fix getValue for NULL values
2 parents dad6618 + 239730f commit df1b0b9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

MysqliDb.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,11 @@ public function getValue ($tableName, $column, $limit = 1)
500500
if (!$res)
501501
return null;
502502

503-
if (isset($res[0]["retval"]) && $limit == 1)
504-
return $res[0]["retval"];
503+
if ($limit == 1) {
504+
if (isset ($res[0]["retval"]))
505+
return $res[0]["retval"];
506+
return null;
507+
}
505508

506509
$newRes = Array ();
507510
for ($i = 0; $i < $this->count; $i++)

0 commit comments

Comments
 (0)