From: calvink at conceptualnetworking dot com Operating system: Linux PHP version: 5.2.4 PHP Bug Type: *General Issues Bug description: strstr before_needle bug
Description: ------------ strstr() does not handle the third parameter appropriately for before_needle. This uses the example provided in the documentation for strstr. Reproduce code: --------------- $email = '[EMAIL PROTECTED]'; $user = strstr($email, '@', true); echo $user; Expected result: ---------------- It should print "name" Actual result: -------------- Nothing is displayed and I receive the error: Warning: Wrong parameter count for strstr() in /xxx/xxx/x/test_read.php5 This also occured using PHP 4.4.7. -- Edit bug report at http://bugs.php.net/?id=42834&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42834&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42834&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42834&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42834&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42834&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42834&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42834&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42834&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42834&r=support Expected behavior: http://bugs.php.net/fix.php?id=42834&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42834&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42834&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42834&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42834&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42834&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42834&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42834&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42834&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42834&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42834&r=mysqlcfg
