summaryrefslogtreecommitdiffstats
path: root/system/core/Security.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-02-09 13:03:14 +0100
committerAndrey Andreev <narf@devilix.net>2015-02-09 13:03:14 +0100
commit074a214ee829e2169058b7f07efdd44edcc3fc4f (patch)
tree11e5e12ca896bb730aaf8a5c4a7bec3697e72e7f /system/core/Security.php
parentf3824973a6aad3370a256c7df4053fef7d9e87d6 (diff)
Fix #3579
Diffstat (limited to 'system/core/Security.php')
-rw-r--r--system/core/Security.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/core/Security.php b/system/core/Security.php
index 7c18c7406..ccb141260 100644
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -639,7 +639,7 @@ class CI_Security {
$str_compare = $str;
// Decode standard entities, avoiding false positives
- if ($c = preg_match_all('/&[a-z]{2,}(?![a-z;])/i', $str, $matches))
+ if (preg_match_all('/&[a-z]{2,}(?![a-z;])/i', $str, $matches))
{
if ( ! isset($_entities))
{
@@ -664,7 +664,7 @@ class CI_Security {
$replace = array();
$matches = array_unique(array_map('strtolower', $matches[0]));
- for ($i = 0; $i < $c; $i++)
+ for ($i = 0, $c = count($matches); $i < $c; $i++)
{
if (($char = array_search($matches[$i].';', $_entities, TRUE)) !== FALSE)
{