diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-12-18 15:25:28 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-12-18 15:25:28 +0100 |
commit | 6c707323f23d0abc0759ba2d61caf148c5c68edb (patch) | |
tree | 5be1c250262a80bc26c2b8140346a7de85604a4e /lib/private/json.php | |
parent | 277ae281718febddd82846ebbdf7ec3c6380bc07 (diff) | |
download | nextcloud-server-6c707323f23d0abc0759ba2d61caf148c5c68edb.tar.gz nextcloud-server-6c707323f23d0abc0759ba2d61caf148c5c68edb.zip |
only walk an array
Diffstat (limited to 'lib/private/json.php')
-rw-r--r-- | lib/private/json.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/json.php b/lib/private/json.php index 8401f7c3a12..6a9e5a2df5e 100644 --- a/lib/private/json.php +++ b/lib/private/json.php @@ -116,7 +116,9 @@ class OC_JSON{ * Encode JSON */ public static function encode($data) { - array_walk_recursive($data, array('OC_JSON', 'to_string')); + if (is_array($data)) { + array_walk_recursive($data, array('OC_JSON', 'to_string')); + } return json_encode($data); } } |