From: Vincent Vanwaelscappel Date: Fri, 5 Jul 2019 09:50:04 +0000 (+0200) Subject: #2843 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=5ad3180e5518851f3d25900b2f5a9e346d1a62a6;p=cubist_util.git #2843 --- diff --git a/src/Cubist/Util/Json.php b/src/Cubist/Util/Json.php index ac98a46..bd11aeb 100644 --- a/src/Cubist/Util/Json.php +++ b/src/Cubist/Util/Json.php @@ -61,9 +61,11 @@ class Json $v = ArrayUtil::asArray($v); array_walk_recursive($v, function (&$v, $k) { - $v_decoded = json_decode($v, true); - if ($v_decoded) { - $v = $v_decoded; + if (is_string($v)) { + $v_decoded = json_decode($v, true); + if ($v_decoded) { + $v = $v_decoded; + } } });