Attempt to read property “post_type” on null
-
hi after updates, and also PHP updates I get this error on the site:
Warning: Attempt to read property “post_type” on null in … wp-content/plugins/events-manager/classes/em-event-post.php on line 207
Lines 205-210 of events-manager/classes/em-event-post.php are as follows:
public static function the_category( $thelist, $separator = '', $parents='' ){ global $post, $wp_rewrite; if( $post->post_type == EM_POST_TYPE_EVENT ){ $EM_Event = em_get_event($post); $categories = $EM_Event->get_categories(); if( empty($categories) ) return '';
Can anyone help me fix it?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Attempt to read property “post_type” on null’ is closed to new replies.