Commit e50afcd6 authored by Alexander Butenko's avatar Alexander Butenko

Merge pull request #2 from aFreshMelon/patch-1

Fixing getOne to not error on 0 results
parents 174f29ab 7d07155f
......@@ -220,7 +220,11 @@ class MysqliDb
public function getOne($tableName, $columns = '*')
{
$res = $this->get ($tableName, 1, $columns);
return $res[0];
if(isset($res[0])) {
return $res[0];
} else {
return null;
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment