• I keep getting the following PHP error:

    Notice: Trying to get property of non-object in /home/mijzpycq/public_html/wp-content/plugins/conditional-menus/init.php on line 286

    Does anyone have any solutions? The plugin hasn’t been updated in over 7 months, it seems as though they just abandoned it altogether. Any help would be appreciated. Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I get the error on a different line.

    Notice: Undefined offset: 0 in xyz/wp-content/plugins/conditional-menus/init.php on line 232

    Hi @thewhitesky!
    try this:

    Line 284: if( ! $visible && ! empty( $logic['post_type'] ) ) {
    
    					$slug = null; 
                                            
    //The magic is to test if $query_object->post_name exists
    					if( $query_object && $query_object->post_name ){
    						$slug = $shop ? $this->get_wc_shop() : $query_object->post_name;
    					}; 	
    									
    					foreach( $logic['post_type'] as $post_type => $posts ) { (...)

    I think the creator should update for something like this

    • This reply was modified 6 years, 7 months ago by tianth.
    • This reply was modified 6 years, 7 months ago by tianth.
    • This reply was modified 6 years, 7 months ago by tianth.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Php Error 286’ is closed to new replies.