Unverified Commit cea3dc06 authored by Tomáš Holan's avatar Tomáš Holan Committed by GitHub

Fix formatParameters with resource

parent 9f1c1581
...@@ -190,6 +190,10 @@ class DBALException extends \Exception ...@@ -190,6 +190,10 @@ class DBALException extends \Exception
private static function formatParameters(array $params) private static function formatParameters(array $params)
{ {
return '[' . implode(', ', array_map(function ($param) { return '[' . implode(', ', array_map(function ($param) {
if (is_resource($param)) {
return (string) $param;
}
$json = @json_encode($param); $json = @json_encode($param);
if (! is_string($json) || $json == 'null' && is_string($param)) { if (! is_string($json) || $json == 'null' && is_string($param)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment