Warnings thrown about accessing undefined member
-
When Page Tree checks to see if the admin screen is one of “its pages”, some plugins (e.g. WP Filebase) cause it to throw warnings about undefined members. I tracked this down to the value of “$current_screen” being null in some circumstances. This can be solved by adding a check to see if $current_screen is not null.
functions.php:
function cms_tpv_is_one_of_our_pages() {
...
$current_screen = get_current_screen();
if(!$current_screen) return FALSE; //<-- add a check here
...
}
- The topic ‘Warnings thrown about accessing undefined member’ is closed to new replies.