Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Deprecated error in recover cart sales


14steve14

Recommended Posts

I am now getting a deprecated error wanring with this bit of code in the recover carts module. I have searched for an answer, but cant seem to find anything.

 

if ( ereg( "customer_id[^\"]*\"([0-9]*)\"", $ses['value'], $custval ) )

 

 

 

I know that ereg becomes preg_match but i just cant figure out the rest.

 

Can someone help me sort this out please.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Try

preg_match( "/customer_id[^\"]*\"([0-9]*)\"/", $ses['value'], $custval ) )

Also, the return should be checked against FALSE so it should be

if ( preg_match( "/customer_id[^\"]*\"([0-9]*)\"/", $ses['value'], $custval )   !== FALSE)

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...