From 89c1993f917ec7da4df60dce8a3abdac5ea34668 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 11 Jul 2019 14:24:01 +0200 Subject: [PATCH] #2878 --- src/Cubist/Util/Json.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Cubist/Util/Json.php b/src/Cubist/Util/Json.php index bd11aeb..79d738a 100644 --- a/src/Cubist/Util/Json.php +++ b/src/Cubist/Util/Json.php @@ -50,14 +50,18 @@ class Json public static function decodeRecursive($encodedValue, $objectDecodeType = self::TYPE_OBJECT) { $v = $encodedValue; - if (is_string($encodedValue)) { $v = json_decode($encodedValue); + if (!$v) { return $encodedValue; } } + if(is_scalar($v)){ + return $v; + } + $v = ArrayUtil::asArray($v); array_walk_recursive($v, function (&$v, $k) { -- 2.39.5