• Resolved Qwindoo

    (@qwindoo)


    Hi,

    I’m getting the following message when browsing some screens in the dashboard (ex those of the Members plugin): “Notice : Trying to get property of non-object in xxx/xxxxxx/xxxx/xxxx/plugins/events-manager/classes/em-location-post-admin.php on line 154“.

    The fix seems pretty straightforward, simply check if $post is empty before manipulating it:

    public static function meta_boxes(){
    	global $EM_Location, $post;
    	//no need to proceed if we're not dealing with a location
    	if(empty($post) || $post->post_type != EM_POST_TYPE_LOCATION ) return;

    Thanks,
    Thomas

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘“Notice: Trying to get property of non-object in”’ is closed to new replies.