diff options
author | Joshua Logsdon <logsdon.joshua@gmail.com> | 2015-03-25 17:03:43 +0100 |
---|---|---|
committer | Joshua Logsdon <logsdon.joshua@gmail.com> | 2015-03-25 17:03:43 +0100 |
commit | 993e340a9a0e00c5a2cdbbfc47f0c8a24e8e4bf1 (patch) | |
tree | e47926869e308cc3f221e8eaee10ebda0bceec7e /system | |
parent | 28625e5bc99c59f90db117ecfddf5533db11c61e (diff) |
Return empty $var immediately
Signed-off-by: Joshua Logsdon <logsdon.joshua@gmail.com>
Diffstat (limited to 'system')
-rw-r--r-- | system/core/Common.php | 12 |
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)); } |