Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.6.0a3

Bug #12301 Compat calls php 5 function
Submitted: 2007-10-22 16:56 UTC
From: phpwebber Assigned: arpad
Status: Closed Package: PHP_Compat (version 1.6.0a1)
PHP Version: 4.3.9 OS: Linux
Roadmaps: 1.6.0a2    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 41 - 6 = ?

 
 [2007-10-22 16:56 UTC] phpwebber (Matt McNaney)
Description: ------------ In str_ireplace line 73: $result = preg_replace($search, $replace, $subject, -1, $count); From: http://us3.php.net/manual/en/function.preg-replace.php 5.1.0 Added the count parameter Since the fifth parameter is 5+ specific, user is getting this error: Warning: Wrong parameter count for preg_replace() in ../lib/pear/Compat/Function/str_ireplace.php on line 73 Test script: --------------- echo str_ireplace('foo', 'bar', 'foo'); Expected result: ---------------- bar Actual result: -------------- Warning: Wrong parameter count for preg_replace() in ../lib/pear/Compat/Function/str_ireplace.php on line 73

Comments

 [2007-12-03 22:10 UTC] arpad (Arpad Ray)
Thanks for the report, using a PHP 5 feature was obviously an oversight but we've decided to drop support for the $count argument since we can't make it optional in PHP 4 and the performance cost is too great when a count isn't necessary. This is now fixed in CVS.