Error: fn.common.php on line 2642

I am seeing the following error all over my site:



Warning: preg_replace_callback(): Requires argument 2, '', to be a valid callback in /home/lehmannr/public_html/app/functions/fn.common.php on line 2642
%m/%d/%Y




I am not sure how to fix this? I am running CS-Cart 4.0.2 and it was working fine with CS-Cart 4.0.1. I just upgraded it via the admin panel and now this happened. By the looks of the error, it seems like fn.common.php is trying to call a command that is missing. I wonder if the upgrade delete or moved it.



I am experiencing a ton of issues with CSCart v4. Lots of bugs. Tons of problems. Helpdesk wants to charge me to fix their mistake. Somebody please help me.

There are a considerable amount of changes to fn.common.php from 4.0.1 including the line that it is specifying. I would reupload that file and see what happens.



4.0.1

return preg_replace("/(%.)/e", "\$s['\\1']", $format);



4.0.2

return preg_replace_callback("/(%.)/", function($m) use ($s) {
if (isset($s[$m[1]])) {
return $s[$m[1]];
} else {
return false;
}
}, $format);




Edit: I do not see the error on your site.

Apparently it was due to “eAccelerator” not being disabled with my host. They disabled it, now it works.



It took CS-Cart three days to write back and they charged me to tell me to tell my host to can it, but it works.



Upset but glad it's over with.