commit | 28625e5bc99c59f90db117ecfddf5533db11c61e | [log] [tgz] |
---|---|---|
author | Joshua Logsdon <logsdon.joshua@gmail.com> | Tue Mar 24 14:33:21 2015 -0400 |
committer | Joshua Logsdon <logsdon.joshua@gmail.com> | Tue Mar 24 14:33:21 2015 -0400 |
tree | 4614624152178dc19582266d359c23137ce34c9f | |
parent | 7ad59209ad2443b8ea113222e3cab38ab305da92 [diff] |
array_fill() throws an error if count($var) is 0 Signed-off-by: Joshua Logsdon <logsdon.joshua@gmail.com>
diff --git a/system/core/Common.php b/system/core/Common.php index ee5a705..935c687 100644 --- a/system/core/Common.php +++ b/system/core/Common.php
@@ -743,6 +743,12 @@ { 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)); }