• Hi, I’m testing this plugin with WP 4.5.3 and php 7, and I get the next error:

    preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/smnecnmc-dev/public_html/wp-content/plugins/wp-htaccess-control/wp-htaccess-control.php

    Do you have any update for php 7?

    https://ww.wp.xz.cn/plugins/wp-htaccess-control/

Viewing 2 replies - 1 through 2 (of 2 total)
  • hi,
    please it’s urgent, do you have any fix for this?

    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 2 replies - 1 through 2 (of 2 total)

The topic ‘php 7 support’ is closed to new replies.