Welcome! Log In Create A New Profile

Advanced

deprecated parameter in preg_replace

Posted by Jan 
Jan
deprecated parameter in preg_replace
January 11, 2015 06:37PM
Recently when indexing I got this message: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in D:\xampp\htdocs\xampp\sphider\admin\spiderfuncs.php on line 611
and the same for line 612.
As I am not so good a programmer my question is how to solve this problem. The indexing is done, but I prefer to solve this.
All the best,
Jan
Re: deprecated parameter in preg_replace
January 11, 2015 09:35PM
Line 611
//$file = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"winking smiley)', $file);
$file = preg_replace('~&#x([0-9a-f]+);~i', create_function ('$matches', 'return chr(hexdec($matches[1]));'), $file);

Line 612
// $file = preg_replace('~&#([0-9]+);~e', 'chr("\\1"winking smiley', $file);
$file = preg_replace('~&#([0-9]+);~', create_function ('$matches', 'return chr($matches[1]);'), $file);
Jan
Re: deprecated parameter in preg_replace
January 13, 2015 04:07PM
Thank you very much.
Sorry, only registered users may post in this forum.

Click here to login