Skip to content
Snippets Groups Projects
Commit fe093b28 authored by Marcin Kolanko's avatar Marcin Kolanko
Browse files

fix: check if get_current_screen is an object

parent 082da904
No related branches found
No related tags found
1 merge request!27fix: check if get_current_screen is an object
Pipeline #180736 passed with stages
in 1 minute and 15 seconds
......@@ -101,7 +101,9 @@ class Notice
require_once ABSPATH . '/wp-admin/includes/screen.php';
}
return \get_current_screen()->is_block_editor();
$screen = \get_current_screen();
return is_object( $screen ) ? $screen->is_block_editor() : false;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment