diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-12-19 03:25:58 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-12-19 03:25:58 -0800 |
commit | ae3df84e207f9bcac1b12923319c18fd80d5252d (patch) | |
tree | 5f72cbb94b9a3a0795589c43a5628b0fca3808e8 /lib | |
parent | 3ea01e2152dda1576b740555ff629f197291e1b8 (diff) | |
parent | 6c707323f23d0abc0759ba2d61caf148c5c68edb (diff) | |
download | nextcloud-server-ae3df84e207f9bcac1b12923319c18fd80d5252d.tar.gz nextcloud-server-ae3df84e207f9bcac1b12923319c18fd80d5252d.zip |
Merge pull request #6491 from owncloud/fix-warning-array_walk_recursive-json
only walk an array
Diffstat (limited to 'lib')
-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); } } |