Здравствуйте, после обновления плагина вылезло на главной странице
Trying to get property 'ID' of non-object in wp-includes/class-wp-query.php on line 3750
Trying to get property 'post_title' of non-object in wp-includes/class-wp-query.php on line 3752
Trying to get property 'post_name' of non-object in wp-includes/class-wp-query.php on line 3754
Подскажите, пожалуйста, как можно убрать?
public function is_page( $page = '' ) {
if ( !$this->is_page )
return false;
if ( empty( $page ) )
return true;
$page_obj = $this->get_queried_object();
$page = array_map( 'strval', (array) $page );
if ( in_array( (string) $page_obj->ID, $page ) ) {
return true;
} elseif ( in_array( $page_obj->post_title, $page ) ) {
return true;
} elseif ( in_array( $page_obj->post_name, $page ) ) {
return true;
} else {
foreach ( $page as $pagepath ) {
if ( ! strpos( $pagepath, '/' ) ) {
continue;
}
$pagepath_obj = get_page_by_path( $pagepath );
if ( $pagepath_obj && ( $pagepath_obj->ID == $page_obj->ID ) ) {
return true;
}
}
}
return false;
}