]> _ Git - cubist_util.git/commitdiff
#2843
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 5 Jul 2019 09:50:04 +0000 (11:50 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 5 Jul 2019 09:50:04 +0000 (11:50 +0200)
src/Cubist/Util/Json.php

index ac98a46c831cb18dfbe2f12598fab1b52fd8217a..bd11aebca3959ceebe09608445a27b1bd89b3474 100644 (file)
@@ -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;
+                }
             }
         });