Skip to content

Commit

Permalink
Merge pull request #150 from skipperbent/v4-development
Browse files Browse the repository at this point in the history
Version 4.15.6
  • Loading branch information
skipperbent authored Feb 18, 2023
2 parents e84465f + 77749ea commit e46b35c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Pecee/Pixie/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public static function create(\Exception $e, string $adapterName = null, QueryOb
* @var integer|null $errorCode
* @var string|null $errorMsg
*/
[$errorSqlState, $errorCode, $errorMsg] = $e->errorInfo;
$errorSqlState = $e->errorInfo[0] ?? null;
$errorCode = $e->errorInfo[1] ?? 0;
$errorMsg = $e->errorInfo[2] ?? null;

$errorMsg = $errorMsg ?? $e->getMessage();
$errorCode = (int)($errorCode ?? $e->getCode());
Expand Down

0 comments on commit e46b35c

Please sign in to comment.