• Resolved Garrett Hyder

    (@garrett-eclipse)


    Hello,

    Just wanted to flag this warning I’ve been seeing in my logs;

    [18-Apr-2017 20:26:54 UTC] PHP Notice: Trying to get property of non-object in /wp-content/plugins/wp-property/lib/shortcodes/property-search.php on line 134

    It seems to be the fact the $post object is empty so the $post->ID is unavailable for this line;
    $widget_id = $post->ID . "_search";

    Might want to update it with a quick check, something like this;

    if (!empty($post)) {
        $widget_id = $post->ID . "_search";
    } else {
        $widget_id = "property_search";        	
    }

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Property Search Widget Shortcode has empty $post’ is closed to new replies.