diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2013-02-22 00:51:54 +0100 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2013-02-22 00:51:54 +0100 |
commit | efe33c508e140c595a2020ceff4f5a3f4006d9c1 (patch) | |
tree | 90a420bba53f13d26da6fe99c3bf437c53dc9bc7 | |
parent | a8a85ed6b411e847891ce3e3d2d9aecb6846f962 (diff) | |
download | nextcloud-server-efe33c508e140c595a2020ceff4f5a3f4006d9c1.tar.gz nextcloud-server-efe33c508e140c595a2020ceff4f5a3f4006d9c1.zip |
Don't walk objects with array_walk_recursive()
-rwxr-xr-x | lib/util.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php index ab47e404c97..53a30cfc1bb 100755 --- a/lib/util.php +++ b/lib/util.php @@ -504,10 +504,10 @@ class OC_Util { * @return array with sanitized strings or a single sanitized string, depends on the input parameter. */ public static function sanitizeHTML( &$value ) { - if (is_array($value) || is_object($value)) { + if (is_array($value)) { array_walk_recursive($value, 'OC_Util::sanitizeHTML'); } else { - $value = htmlentities($value, ENT_QUOTES, 'UTF-8'); //Specify encoding for PHP<5.4 + $value = htmlentities((string)$value, ENT_QUOTES, 'UTF-8'); //Specify encoding for PHP<5.4 } return $value; } |