Skip to content

Commit f99a4de

Browse files
committed
1 parent 0512543 commit f99a4de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

system/core/Security.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ public function entity_decode($str, $charset='UTF-8')
513513
$str_compare = $str;
514514

515515
// Decode standard entities, avoiding false positives
516-
if ($c = preg_match_all('/&[a-z]{2,}(?![a-z;])/i', $str, $matches))
516+
if (preg_match_all('/\&[a-z]{2,}(?![a-z;])/i', $str, $matches))
517517
{
518518
if ( ! isset($_entities))
519519
{
@@ -538,7 +538,7 @@ public function entity_decode($str, $charset='UTF-8')
538538

539539
$replace = array();
540540
$matches = array_unique(array_map('strtolower', $matches[0]));
541-
for ($i = 0; $i < $c; $i++)
541+
for ($i = 0, $c = count($matches); $i < $c; $i++)
542542
{
543543
if (($char = array_search($matches[$i].';', $_entities, TRUE)) !== FALSE)
544544
{

0 commit comments

Comments
 (0)