diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2013-02-25 12:53:23 -0800 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2013-02-25 12:53:23 -0800 |
commit | a2a1e8c2cbb944ee7b49928cfc3f00401a39b0fc (patch) | |
tree | 672fe8c6d594fdf44a4e0fa1e9a0cbba066358d2 /lib/util.php | |
parent | 6dd1d479dabbe69be971525034b2711497e34098 (diff) | |
parent | efe33c508e140c595a2020ceff4f5a3f4006d9c1 (diff) | |
download | nextcloud-server-a2a1e8c2cbb944ee7b49928cfc3f00401a39b0fc.tar.gz nextcloud-server-a2a1e8c2cbb944ee7b49928cfc3f00401a39b0fc.zip |
Merge pull request #1839 from owncloud/no_recursive_object_walking
Don't walk objects with array_walk_recursive()
Diffstat (limited to 'lib/util.php')
-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 ae6b4646e1b..cfb13ad292d 100755 --- a/lib/util.php +++ b/lib/util.php @@ -496,10 +496,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; } |