mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-30 21:29:23 +02:00
Remove negation of condition to make the code easier to read.
This commit is contained in:
parent
6e2797ffc0
commit
6af3289f43
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user