Skip to content

Commit

Permalink
Merge pull request #305 from avbdr/master
Browse files Browse the repository at this point in the history
Fix getValue for NULL values
  • Loading branch information
avbdr committed Aug 26, 2015
2 parents dad6618 + 239730f commit df1b0b9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions MysqliDb.php
Expand Up @@ -500,8 +500,11 @@ public function getValue ($tableName, $column, $limit = 1)
if (!$res)
return null;

if (isset($res[0]["retval"]) && $limit == 1)
return $res[0]["retval"];
if ($limit == 1) {
if (isset ($res[0]["retval"]))
return $res[0]["retval"];
return null;
}

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

0 comments on commit df1b0b9

Please sign in to comment.