problem with my last ere deprecation issue, can anyone help?

I’ve been updating my php files to change all ere and ere deprecated function calls to the new pre_match but I’m having problems with the last one. I’ve posted the code below. Can anyone help?

Thanks in advance

// build session parameter for shared SSL to pass over
if(!ereg(array("ccUser","/admin/"),$_SERVER['PHP_SELF']) && !empty($_SESSION['ccUser']) && $storeURL!==$storeURL_SSL && $config['ssl']==1){
	
	$params['ccUser'] = $_SESSION['ccUser'];
	
}

[php] // build session parameter for shared SSL to pass over
if(preg_match(’/ccUser|/admin//’,$_SERVER[‘PHP_SELF’]) !== 0 && !empty($_SESSION[‘ccUser’]) && $storeURL!==$storeURL_SSL && $config[‘ssl’]==1){

  $params['ccUser'] = $_SESSION['ccUser'];

}
[/php]

Thanks jcbones for your help, it’s very much appreciated, finally I’m up and running again. :smiley:

Just one thing, don’t use $_SERVER[‘PHP_SELF’]. It is vulnerable to SQL Injection. Use $_SERVER[‘SCRIPT_NAME’]

Thanks Kevin Rubio, I’ll sort that :slight_smile:

Sponsor our Newsletter | Privacy Policy | Terms of Service