Skip to content

Commit 107c7fc

Browse files
committed
Check that a current screen is set before reading its ID in the global styles settings.
1 parent a2b74d6 commit 107c7fc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎lib/global-styles.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ function gutenberg_experimental_global_styles_settings( $settings ) {
8080
if (
8181
is_callable( 'get_current_screen' ) &&
8282
function_exists( 'gutenberg_is_edit_site_page' ) &&
83+
is_object( get_current_screen() ) &&
8384
gutenberg_is_edit_site_page( get_current_screen()->id ) &&
8485
WP_Theme_JSON_Resolver_Gutenberg::theme_has_support() &&
8586
gutenberg_supports_block_templates()

0 commit comments

Comments
 (0)