Mantis - Quercus
Viewing Issue Advanced Details
1502 major always 12-10-06 08:24 12-12-06 06:32
at4u GNU/Linux  
nam Gentoo Linux  
normal N/A  
closed 3.0.22  
fixed  
none    
none 3.1.0  
0001502: stristr implementation seems to be buggy
Hi there,

while testing a PHP Java bridge and server side JVM management for performance reasons I installed Resin 3.0.22.

I found the following bug while doing so:

Script:
<?php
if (stristr ("bug","bug")) { echo "Everything works as expected"; }
else { echo "We found a new bug here!"; }
?>

Actual result:
Output: "We found a new bug here!"

Expected:
Output: "Everything works as expected"
Save the script as a PHP file and load it via Resin.
Same for the following comparision:
if (stristr ("bugab","bug")) { echo "Everything works as expected"; }
else { echo "We found a new bug here!"; }

Looks like Quercus ignores a matches if its at the beginning of the string.

Notes
(0001647)
nam   
12-12-06 06:32   
php/1123