Error should be checked on the db connection, not on the result

This commit is contained in:
Andrew O'Neil 2017-03-01 10:41:06 +11:00
parent 6af3289f43
commit 9492a8b92f

View File

@ -228,7 +228,7 @@ class PDOConnector extends DBConnector {
$result = $this->pdoConnection->exec($sql); $result = $this->pdoConnection->exec($sql);
// Check for errors // Check for errors
if($this->hasError($result)) { if($this->hasError($this->pdoConnection)) {
$this->databaseError($this->getLastError(), $errorLevel, $sql); $this->databaseError($this->getLastError(), $errorLevel, $sql);
return null; return null;
} }