mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Error should be checked on the db connection, not on the result
This commit is contained in:
parent
6af3289f43
commit
9492a8b92f
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user