• Hi,
    This is a great plugin.
    We’ve updated the host to use php7 and now the plugin returns an error

    Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /public_html/wp-content/plugins/wp-htaccess-control/wp-htaccess-control.php on line 337

    Please help,
    Its urgent, out permalinks don’t work anymore, and because of that we have big problems with Google & SEO.

Viewing 1 replies (of 1 total)
  • Thread Starter tigrom

    (@tigrom)

    anyone having this issue when upgrading to php7
    THE SOLUTION is to replace
    line this
    $rewrite_rules = unserialize( preg_replace ( '!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'" , $rewrite_rules ) );

    with this
    $rewrite_rules = unserialize( preg_replace_callback('!s:(\d+):"(.*?)";!s' , function (array $m) { return sprintf('s:%d:"%s";', strlen($m[2]), $m[2]);} , $rewrite_rules));

Viewing 1 replies (of 1 total)
  • The topic ‘Plugin error: preg_replace() : The /e modifier is no longer supported. URGENT’ is closed to new replies.