Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

preg_replace issue


freakystreak

Recommended Posts

Recently moved server and now getting an error using the order_editor add-on. The error I'm getting is:

Quote

Warning: preg_replace(): Unknown modifier '|' in /xxxx/admin/order_editor/functions.php on line 243

Offending line 243 reads as:

$keyword = preg_replace("(,)|('s)", "", $keyword);

I take it it's a PHP issue as the server uses a newer version of PHP. I've looked and from what I can gather it's a formatting issue with the above code. Can anyone shed any light on this please?

Ah, the world wide web. What a wonderful place.

Link to comment
Share on other sites

Add delimiters:

$keyword = preg_replace("/(,)|('s)/", "", $keyword);

You'll probably find other such cases. If you're not on the latest osC (2.3.4.1BS Frozen), you're wasting your time trying to patch up an old osC to run on a modern PHP.

Link to comment
Share on other sites

Thank you very much, that's done the trick. I will indeed be upgrading our site to the latest Frozen version. It's on my job list. Thanks again.

Ah, the world wide web. What a wonderful place.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...