From 5ad3180e5518851f3d25900b2f5a9e346d1a62a6 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 5 Jul 2019 11:50:04 +0200 Subject: [PATCH] #2843 --- src/Cubist/Util/Json.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; + } } }); -- 2.39.5