• Resolved acsnaterse

    (@acsnaterse)


    When purging the cache (or saving something, which causes a purge) a Fatal error is thrown by the following line:

    purge.clas.php, line 1139:
    $recent_posts = $wp_widget_factory->widgets['WP_Widget_Recent_Posts'];

    Because in our setup/website we’ve remove unused widgets, and thus also this one, it generates a notice. But in PHP8 the notice will cause a fatal error.

    Changing the line into $recent_posts = $wp_widget_factory->widgets['WP_Widget_Recent_Posts'] ?? null; should fix it.

    Would be great if this can be solved ??

    Thanks!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Fatal error while purging on PHP8’ is closed to new replies.