summaryrefslogtreecommitdiffstats
path: root/lib/util.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2013-02-25 12:53:23 -0800
committerLukas Reschke <lukas@statuscode.ch>2013-02-25 12:53:23 -0800
commita2a1e8c2cbb944ee7b49928cfc3f00401a39b0fc (patch)
tree672fe8c6d594fdf44a4e0fa1e9a0cbba066358d2 /lib/util.php
parent6dd1d479dabbe69be971525034b2711497e34098 (diff)
parentefe33c508e140c595a2020ceff4f5a3f4006d9c1 (diff)
downloadnextcloud-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-xlib/util.php4
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;
}