Skip to content

Commit

Permalink
fix #14
Browse files Browse the repository at this point in the history
  • Loading branch information
emalherbi committed Jun 5, 2018
1 parent a1b65a0 commit 00764b9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/MyMssql.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@ public function fetchOne($sql)
$this->logger('MyMssql Fetch One: '.json_encode($result));
}

return empty($result) ? false : array_values($result)[0];
$result = empty($result) ? false : array_values($result);

if (is_array($result)) {
return $result[0];
}

return false;
}

public function fetchRow($sql)
Expand Down

0 comments on commit 00764b9

Please sign in to comment.