Viewing 2 replies - 1 through 2 (of 2 total)
  • The latest version works with WordPress 6.0.2 in my tests, but not on older versions of PHP (probably nothing below 7.0). I got the following error message:

    • Plugin could not be activated because it triggered a fatal error.
      Parse error: syntax error, unexpected ‘?’ in /home/jdlzuxir7txb/public_html/wp-content/plugins/pagerestrict/pagerestrict.php on line 31

    I fixed it on a client site using WordPress 6.0.2 (the latest version at this writing) and PHP 5.6.4 by changing Line 31 from…

    return $pr_options[$option] ?? false;

    …to….

    return isset( $pr_options[$option] ) ? $pr_options[$option] : false;

    Thread Starter derevan007

    (@derevan007)

    Thanks, Aaron. I am on PHP 7.4. The only thing I get is dozens of debug messages like:

    PHP Notice: Undefined index: log in public_html/wpcontent/plugins/pagerestrict/pagerestrict.php on line 267

    (but now that I look back, it was always throwing this; haven’t had a chance to look at what’s happening on that line yet).

    Other than that, I do think it is working. Thanks for corroborating.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress 6.0 Compatibility’ is closed to new replies.