PHP Classes

FIX: Empty tag infinite loop bug

Recommend this page to a friend!

      PHP Input Filter  >  All threads  >  FIX: Empty tag infinite loop bug  >  (Un) Subscribe thread alerts  
Subject:FIX: Empty tag infinite loop bug
Summary:Fix for an infinite loop bug
Messages:1
Author:Nashar
Date:2007-12-31 08:19:06
 

  1. FIX: Empty tag infinite loop bug   Reply   Report abuse  
Picture of Nashar Nashar - 2007-12-31 08:19:07
If you process an empty tag followed by anything, like '<>foo', the script gets stuck in a infinite loop until you get a lovely message like:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 29360137 bytes) in \includes\class.inputfilter.php on line 134

The fix is to change line 114 from:

if (!$tagOpen_end) {

to

if ($tagOpen_end === false) {

Cheers!