From 76cff5c10aea182efb659d5db11f5ae41a0f233c Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sat, 21 Apr 2018 15:26:53 +0200 Subject: [PATCH] Result: calls unescapeBinary() only for strings [Closes #283] --- src/Dibi/Result.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dibi/Result.php b/src/Dibi/Result.php index bb0bf188..56ae5c89 100644 --- a/src/Dibi/Result.php +++ b/src/Dibi/Result.php @@ -501,7 +501,7 @@ class Result implements IDataSource $row[$key]->invert = (int) (bool) $m[1]; } elseif ($type === Type::BINARY) { - $row[$key] = $this->getResultDriver()->unescapeBinary($value); + $row[$key] = is_string($value) ? $this->getResultDriver()->unescapeBinary($value) : $value; } elseif ($type === Type::JSON) { $row[$key] = json_decode($value);