summaryrefslogtreecommitdiffstats
path: root/system/core/Common.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/core/Common.php')
-rw-r--r--system/core/Common.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/system/core/Common.php b/system/core/Common.php
index 935c687ab..2b1e844b4 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -741,14 +741,14 @@ if ( ! function_exists('html_escape'))
*/
function html_escape($var, $double_encode = TRUE)
{
+ // If empty, skip escaping
+ if (empty($var))
+ {
+ return $var;
+ }
+
if (is_array($var))
{
- // If empty array, skip escaping
- if ( empty($var) )
- {
- return $var;
- }
-
return array_map('html_escape', $var, array_fill(0, count($var), $double_encode));
}