Skip to content

Commit ff3c448

Browse files
Merge pull request #103 from uepg/101-fix-silent-exceptions
fix variavel errorinfo
2 parents 75c1185 + 9007e69 commit ff3c448

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Database/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,8 @@ protected function runQueryCallback($query, $bindings, Closure $callback)
492492
$result = $callback($query, $bindings);
493493

494494
if ($result instanceof \PDOStatement) {
495+
$errorInfo = $result->errorInfo();
495496
if (isset($errorInfo[0]) && $errorInfo[0] !== '00000') {
496-
$errorInfo = $result->errorInfo();
497497
$finalErrorMessage = sprintf(
498498
'SQLSTATE[%s] [%d] %s',
499499
$errorInfo[0],

0 commit comments

Comments
 (0)