Mantis - Quercus
Viewing Issue Advanced Details
2755 minor always 06-27-08 07:15 09-17-08 10:42
ferg  
ferg  
normal  
closed 3.1.6  
fixed  
none    
none 3.2.1  
0002755: str_replace/regexp issue
(rep by atijms)

The following line of code, taken from PHPBB2's viewtopic.php file, always yields an empty string when running on Quercus 3.1.6. On a real PHP server however it does work:


$message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $message . '<'), 1, -1));

Of course, this line can be replaced with something like this:

$regExp = "#(\>(((?>([^><]+|(?R)))*)\<))#se";
$message = str_replace(substr($orig_word[$i],4,-5),"",$message);
But it does causes PHPBB2 to fail when being run out of the box (the body text of all postings will appear to be empty). I remember reading that PHPBB2 was supported on Quercus, so perhaps this is a recent regression?

Notes
(0003317)
ferg   
08-11-08 11:06   
The issue is (?R), which hasn't been implemented yet.
(0003450)
ferg   
09-17-08 10:42   
php/4eq{0,1}