FIX for undefined $current_screen
-
Please can you add in this quick fix for Notice: Trying to get property of non-object in /var/www/public_html/app/plugins/user-last-login/user-last-login.php on line 142.
If you could change line 142 from
if ( 'users' != $current_screen->id ) return;
to
if ( isset($current_screen) && 'users' != $current_screen->id ) return;
Maybe add an
is_admin()
check there too.$current_screen won’t always be set so I’m getting this error in all sorts of places.
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘FIX for undefined $current_screen’ is closed to new replies.