Mantis - Quercus
Viewing Issue Advanced Details
3809 major always 12-11-09 04:31 12-11-09 04:43
Roland Kujundzic  
 
normal  
new 4.0.2  
open  
none    
none  
0003809: Simple strpos of character fails
Verfied on current tomcat 5 with current java 1.6.0_17. Fails with UTF-8 and ISO-8859-1 encoding.

<?php

$txt = 'a b';

if (strpos($txt, '') === false) {
  print "MAJOR BUG!\n";
}

?>

Notes
(0004330)
Roland Kujundzic   
12-11-09 04:43   
All characters c with ord(c) > 127 fail ...

<?php

for ($i = 1; $i < 254; $i++) {
  $x = 'x'.chr($i).'x';

  if (strpos($x, chr($i)) === false) {
    print "strpos fails on chr($i)=[".chr($i)."]
";
  }
}

?>