From 993e340a9a0e00c5a2cdbbfc47f0c8a24e8e4bf1 Mon Sep 17 00:00:00 2001 From: Joshua Logsdon Date: Wed, 25 Mar 2015 12:03:43 -0400 Subject: Return empty $var immediately Signed-off-by: Joshua Logsdon --- system/core/Common.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'system') 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)); } -- cgit v1.2.3-24-g4f1b