summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-12-19 03:25:58 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2013-12-19 03:25:58 -0800
commitae3df84e207f9bcac1b12923319c18fd80d5252d (patch)
tree5f72cbb94b9a3a0795589c43a5628b0fca3808e8 /lib
parent3ea01e2152dda1576b740555ff629f197291e1b8 (diff)
parent6c707323f23d0abc0759ba2d61caf148c5c68edb (diff)
downloadnextcloud-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.php4
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);
}
}