From b036dd3623599fcfe5c90bd405ae66b71e2a06f0 Mon Sep 17 00:00:00 2001 From: Braad Date: Tue, 11 Aug 2015 12:47:35 -0700 Subject: [PATCH] Add an extra check to prevent a PHP notice --- includes/admin/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/admin.php b/includes/admin/admin.php index 6407396..0e5b19a 100755 --- a/includes/admin/admin.php +++ b/includes/admin/admin.php @@ -108,7 +108,7 @@ function trestle_tiny_mce_before_init( $init_array ) { $screen = get_current_screen(); // If we're on an edit screen, add an appropriate 'post-id-XX' or 'page-id-XX'. - if ( 'edit' == $screen->parent_base ) { + if ( is_object( $screen ) && 'edit' == $screen->parent_base ) { // Custom post types always use 'post', so we only need to handle pages. $post_type = ( 'page' == $post->post_type ) ? 'page' : 'post';