From cb3382f6d2713ff9d4fe4cf4498ee312f2efa63e Mon Sep 17 00:00:00 2001 From: Kamil Wylegala Date: Sat, 21 Sep 2024 13:04:20 +0200 Subject: [PATCH] Fixed errorInfo in pdo exception wrapper. (#78) --- lib/Cake/Model/Datasource/PDOExceptionWithQueryString.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Cake/Model/Datasource/PDOExceptionWithQueryString.php b/lib/Cake/Model/Datasource/PDOExceptionWithQueryString.php index dd59c9e06..fdc2cf825 100644 --- a/lib/Cake/Model/Datasource/PDOExceptionWithQueryString.php +++ b/lib/Cake/Model/Datasource/PDOExceptionWithQueryString.php @@ -12,6 +12,7 @@ class PDOExceptionWithQueryString extends PDOException { public function __construct(PDOException $e) { parent::__construct($e->getMessage(), 0, $e->getPrevious()); + $this->errorInfo = $e->errorInfo; $this->code = $e->code; } }