Support » Plugin: Nested Pages » PHP Fatal error: Call to undefined function get_current_screen

  • I’m getting this entry in debug.log:
    PHP Fatal error: Uncaught Error: Call to undefined function NestedPages\get_current_screen() in \wp-content\plugins\wp-nested-pages\app\Redirects.php:64

    The offending line:

    public function linkDeleted($post_id) {
       $screen = get_current_screen(); 
       if ( !$screen ) return;

    A possible fix:

    public function linkDeleted($post_id) {
       if ( function_exists( 'get_current_screen' ) )
            $screen = get_current_screen();
       else return;

    Thanks.

  • The topic ‘PHP Fatal error: Call to undefined function get_current_screen’ is closed to new replies.