summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2013-01-14 22:01:52 +0100
committerLukas Reschke <lukas@statuscode.ch>2013-01-14 22:01:52 +0100
commitc845e756930a43aa0be8b07f3d398c2c1d8f36e8 (patch)
tree8a75397b78baa1b79465b052f5ac733e9bed1a3b
parent53ca0db434f3ad8d043a0a9b76bd59f22af38f99 (diff)
downloadnextcloud-server-c845e756930a43aa0be8b07f3d398c2c1d8f36e8.tar.gz
nextcloud-server-c845e756930a43aa0be8b07f3d398c2c1d8f36e8.zip
Expand if to multiple lines
Oneliners are ugly.
-rwxr-xr-xlib/util.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php
index a8576fc1057..225e70d7658 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -467,8 +467,12 @@ 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)) array_walk_recursive($value, 'OC_Util::sanitizeHTML');
- else $value = htmlentities($value, ENT_QUOTES, 'UTF-8'); //Specify encoding for PHP<5.4
+ if (is_array($value) || is_object($value))
+ {
+ array_walk_recursive($value, 'OC_Util::sanitizeHTML');
+ } else {
+ $value = htmlentities($value, ENT_QUOTES, 'UTF-8'); //Specify encoding for PHP<5.4
+ }
return $value;
}