VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Administration & Configuration VM 1.1 => Topic started by: new12 on April 29, 2010, 17:21:41 pm

Title: "ereg_replace() is deprecated" After switch to PHP 5.3.0
Post by: new12 on April 29, 2010, 17:21:41 pm
Hello,
After I switched to PHP 5.3.0 I started getting this error in the backend:

Code: [Select]
Deprecated: Function ereg_replace() is deprecated in /home/mydrhorn/public_html/administrator/components/com_virtuemart/global.php  on line 137
Any ideas on how to fix this?
Thanks!
Title: Re: "ereg_replace() is deprecated" After switch to PHP 5.3.0
Post by: pjhagel on May 21, 2011, 08:08:29 am
I'm having the same issue. Did you find a solution, or did anyone else?
Title: Re: "ereg_replace() is deprecated" After switch to PHP 5.3.0
Post by: pjhagel on May 21, 2011, 08:24:47 am
Got it...


$GLOBALS['mosConfig_live_site'] = ereg_replace('/$','',SECUREURL);

to   

$GLOBALS['mosConfig_live_site'] = preg_replace('/$/','',SECUREURL);