Remove negation of condition to make the code easier to read.

This commit is contained in:
Andrew O'Neil 2017-02-10 10:54:15 +11:00
parent 6e2797ffc0
commit 6af3289f43

View File

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