From: garichner at i2pmail dot org
Operating system: S.u.S.E. 10.3
PHP version: 5.2.5
PHP Bug Type: Strings related
Bug description: stripos strpos don't do false on needle not found
Description:
------------
stripos strpos don't do false on needle not found
foreach ($buffer_Infile1 as $VAL1) {
foreach ($VAL1 as $VAL2){
$VAL2=trim($VAL2);
$POSP=stripos($VAL1[0],".");
echo $VAL2." ".$POSP."\n";
}
does this
s.schaefer 1
sschaefer 1
but should to this
s.schaefer 1
sschaefer 0
Reproduce code:
---------------
foreach ($buffer_Infile1 as $VAL1) {
foreach ($VAL1 as $VAL2){
$VAL2=trim($VAL2);
$POSP=stripos($VAL1[0],".");
echo $VAL2." ".$POSP."\n";
}
Expected result:
----------------
s.schaefer 1
sschaefer 0
Actual result:
--------------
s.schaefer 1
sschaefer 1
--
Edit bug report at http://bugs.php.net/?id=44427&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=44427&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=44427&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=44427&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44427&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=44427&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44427&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44427&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44427&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44427&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44427&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=44427&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=44427&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44427&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44427&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44427&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44427&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44427&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44427&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44427&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44427&r=mysqlcfg