• Before accessing $post->ID / executing $meta_content = … line, check if $post is actually an object (is_object/isset). When $post object is not set a PHP notice thrown.

    $meta_content = get_post_meta( $post->ID, $this->meta_name, TRUE );

    /wp-content/plugins/widgetize-pages-light/include/otw_components/otw_grid_manager/otw_grid_manager.class.php filter_show_meta_content( $post_content )

    [XXX] PHP 9. call_user_func_array() /vagrant/wp-includes/plugin.php:235
    [XXX] PHP 10. OTW_Grid_Manager->filter_show_meta_content() /vagrant/wp-includes/plugin.php:235
    [XXX] PHP Notice: Trying to get property of non-object in /vagrant/wp-content/plugins/widgetize-pages-light/include/otw_components/otw_grid_manager/otw_grid_manager.class.php on line 269

    • This topic was modified 7 years, 1 month ago by mch0lic.
    • This topic was modified 7 years, 1 month ago by mch0lic.
  • The topic ‘PHP Notice’ is closed to new replies.