summaryrefslogtreecommitdiffstats
path: root/system/core/Common.php
diff options
context:
space:
mode:
authorJoshua Logsdon <logsdon.joshua@gmail.com>2015-03-24 19:33:21 +0100
committerJoshua Logsdon <logsdon.joshua@gmail.com>2015-03-24 19:33:21 +0100
commit28625e5bc99c59f90db117ecfddf5533db11c61e (patch)
tree4614624152178dc19582266d359c23137ce34c9f /system/core/Common.php
parent7ad59209ad2443b8ea113222e3cab38ab305da92 (diff)
array_fill() throws an error if count($var) is 0
Signed-off-by: Joshua Logsdon <logsdon.joshua@gmail.com>
Diffstat (limited to 'system/core/Common.php')
-rw-r--r--system/core/Common.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/system/core/Common.php b/system/core/Common.php
index ee5a705b2..935c687ab 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -743,6 +743,12 @@ if ( ! function_exists('html_escape'))
{
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));
}