Skip to content

Commit

Permalink
return error in case statement went wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
michabbb committed Oct 12, 2018
1 parent c1c42d2 commit d7a120e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions MySQLiBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ public function query($sql, array $params = []) {
}

if (!$stmt) {

$ResponseObj->error = mysqli_error($this->link);
$ResponseObj->errorno = mysqli_errno($this->link);
$ResponseObj->duration = $this->traceEnabled ? (microtime(true) - $traceStart) : 0;

return $ResponseObj;
Expand Down

0 comments on commit d7a120e

Please sign in to comment.