DatabaseInDays Posted April 21, 2011 Share Posted April 21, 2011 we had just upgraded our store to the latest upgrade below 3.0. so we dont have 3.0 but we have the latest to that point. now we have discovered this error exactly. Warning: Wrong parameter count for preg_replace() in /home6/onetrue2/public_html/store/catalog/includes/functions/validations.php on line 100 looks like something to do with this upgraded code is using preg_replace in a manner that was different that the earlier version of the oscommerce code and now conflicts with our php installation version usage of preg_replace. im sure we are not the first to encounter this having upgraded to the latest pre 3.0 version. we are using 2.something RC. not sure but its the latest version that is not 3.0. we didnt do 3.0 yet because our host was using php 5.0 and 3.0 requires like a later version of php. so any idea how we can adjust the layout of our preg_replace? our current usage of it in validations.php is: while (list(,$line) = each($tlds)) { // Get rid of comments $words = explode('#', $line); $tld = trim($words[0]); // TLDs should be 3 letters or more //if (eregi('^[a-z]{3,}$', $tld) == 1) { if (preg_replace('/^[a-z]{3,}$/i', $tld) == 1) { $tld_pattern .= '^' . $tld . '$|'; } } thanks for any help. Link to comment Share on other sites More sharing options...
NodsDorf Posted April 21, 2011 Share Posted April 21, 2011 This may help: http://www.oscommerce.com/forums/topic/210390-preg-replace-help-please/ Link to comment Share on other sites More sharing options...
DatabaseInDays Posted April 21, 2011 Author Share Posted April 21, 2011 This may help: http://www.oscommerce.com/forums/topic/210390-preg-replace-help-please/ didn't help, but thanks. that is more about logic and using preg_replace(). and maybe i should have just posted the one line of code with preg_replace, because mine is about the paramaters passed to preg_replace is not correct. code is using one version of preg_replace and my php configured on my host is using another version , and so they are conflicting. i am just thinking SOMEONE, had this issue, or one of the Oscommerce Guru's have see this before. im a novice and not sure how to proceed. i read in PHP 5.01 that an additional paramater, called amount, was added to preg_replace. so that could be it. i know what i should be doing, but not how to do it, kinda thing Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.