• greetings. Unfortunatelly I am not a coder but I do have a problem.

    I have changed PHP version from php5 to php6 on the server and I recieved following error in my wordpress site.

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/gazetta/domains/miastoiludzie.pl/public_html/prolink.php on line 177

    Line 177 looks like that

    $text = preg_replace(‘!s:(\d+):”(.*?)”;!se’, “‘s:’.strlen(‘$2′).’:\”$2\”;'”, $text);

    When I change function to preg_replace_callback it is giving me this error also:

    Warning: preg_replace_callback(): Requires argument 2, ”s:’.strlen(‘$2′).’:”$2″;”, to be a valid callback in /home/gazetta/domains/miastoiludzie.pl/public_html/prolink.php on line 177

    The question is how to modify this line and function

    $text = preg_replace_callback(‘!s:(\d+):”(.*?)”;!se’, “‘s:’.strlen(‘$2′).’:\”$2\”;'”, $text);

    to be valid without broken the code. Since I don’t know how to do it I am asking you for a little help. : ) Thanks in advance

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Deprecated: preg_replace()’ is closed to new replies.