diff --git a/src/Illuminate/Database/QueryException.php b/src/Illuminate/Database/QueryException.php index a83657188538..04ef5c4b155d 100644 --- a/src/Illuminate/Database/QueryException.php +++ b/src/Illuminate/Database/QueryException.php @@ -3,7 +3,6 @@ namespace Illuminate\Database; use Illuminate\Support\Facades\DB; -use Illuminate\Support\Str; use PDOException; use Throwable; @@ -64,7 +63,7 @@ public function __construct($connectionName, $sql, array $bindings, Throwable $p */ protected function formatMessage($connectionName, $sql, $bindings, Throwable $previous) { - return $previous->getMessage().' (Connection: '.$connectionName.', SQL: '.Str::replaceArray('?', $bindings, $sql).')'; + return $previous->getMessage().' (Connection: '.$connectionName.', SQL: '.$this->getRawSql().')'; } /**