From 0f69d5d32c5c923e33f117c24e9ee4cf9fd3369b Mon Sep 17 00:00:00 2001 From: David Grudl Date: Thu, 26 Mar 2020 03:06:22 +0100 Subject: [PATCH] Result: does not drop the value if detection fails --- src/Dibi/Result.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Dibi/Result.php b/src/Dibi/Result.php index e22182d1..c7a66f74 100644 --- a/src/Dibi/Result.php +++ b/src/Dibi/Result.php @@ -500,6 +500,12 @@ class Result implements IDataSource } else { $row[$key] = json_decode($value, $this->formats[$type] === 'array'); } + + } elseif ($type === null) { + $row[$key] = $value; + + } else { + throw new \RuntimeException('Unexpected type ' . $type); } } }