mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02: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);
|
||||
|
||||
// Check for errors
|
||||
if($this->hasError($result)) {
|
||||
if($this->hasError($this->pdoConnection)) {
|
||||
$this->databaseError($this->getLastError(), $errorLevel, $sql);
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user