Support » Plugin: Search Everything » Notice: trying to get property of non-object

  • With WP_DEBUG on, this notice is echoed on post update, causing “headers already sent”. The notice occurs due to line 931 of search-everything.php:

    $status = json_decode($zemanta_response['body'])->status;

    I’ve attempted to quiet the notice by changing line 930 to:

    if (!is_wp_error($zemanta_response) && is_array($zemanta_response)) {

    As always, I hate editing plugins directly. Hopefully the cause of this can be addressed in a coming update.

    https://wordpress.org/plugins/search-everything/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Yeah I having the same error too, upon wanting to publish a post. It still saves it, but goes to a blank white screen with errors. Thanks FPCSJames for offering a temporary fix.

    Just to add this only happens on native post type (post) but all other custom post types are unaffected.

    Each one is registered as so:

    add_action('init', 'register_my_cpt_organisation');
    function register_my_cpt_organisation() {
    register_post_type('organisation_profiles', array(
    'label' => 'Organisation Profiles',
    'description' => '',
    'public' => true,
    'show_ui' => true,
    'menu_position' => 15,
    'show_in_menu' => true,
    'capability_type' => 'post',
    'map_meta_cap' => true,
    'hierarchical' => false,
    'rewrite' => array('slug' => 'organisation-profiles', 'with_front' => true),
    'query_var' => true,
    'supports' => array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes'),
    // 'taxonomies' => array('profiles_and_insight'),
    'labels' => array (
      'name' => 'Organisation Profiles',
      'singular_name' => 'Team Memeber',
      'menu_name' => 'Team',
      'add_new' => 'Add a Team Memeber',
      'add_new_item' => 'Add New Team Memeber',
      'edit' => 'Edit',
      'edit_item' => 'Edit Team Memeber',
      'new_item' => 'New Team Memeber',
      'view' => 'View Team Memeber',
      'view_item' => 'View Team Memeber',
      'search_items' => 'Search Team Memebers',
      'not_found' => 'No Team Memeber Found',
      'not_found_in_trash' => 'No Team Memeber Found in Trash',
      'parent' => 'Team',
    )
    ) ); }

    Hey,

    thanks for the heads up to both of you, truly appreciate it! The fix will be implemented in our next release.

    Take care and have an amazing weekend,
    Petra

    This still seems to be an issue, for me at least. Is there a new version expected any time soon?

    Sadly the fix described above does not seem to help in my case, and neither does it matter if WP_DEBUG is true or false.

    To fix it on my site I needed to change line 930 further to:

    if (isset(json_decode($zemanta_response[‘body’])->status)) {

    Hey,

    yes, we are planning to release a new version in the next two weeks – please bear with us in the meantime.

    Sorry for the inconvenience, take care and have a lovely day,
    Petra

    Just bumped into the bug. Looking forward to this being fixed. Please let us know 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Notice: trying to get property of non-object’ is closed to new replies.