Title: PHP Fatal error: Call to undefined function get_current_screen
Last modified: May 18, 2019

---

# PHP Fatal error: Call to undefined function get_current_screen

 *  [alx359](https://wordpress.org/support/users/alx359/)
 * (@alx359)
 * [7 years ago](https://wordpress.org/support/topic/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.

 * ![](https://ps.w.org/wp-nested-pages/assets/icon-128x128.png?rev=1690043)
 * [Nested Pages](https://wordpress.org/plugins/wp-nested-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-nested-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-nested-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-nested-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-nested-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-nested-pages/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [alx359](https://wordpress.org/support/users/alx359/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/php-fatal-error-call-to-undefined-function-get_current_screen/)
 * Status: not resolved