mirror of
https://github.com/nextcloud/server.git
synced 2024-07-25 13:54:59 +02:00
Don't walk objects with array_walk_recursive()
This commit is contained in:
parent
a8a85ed6b4
commit
efe33c508e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user