WordPress.org

Ready to get started?Download WordPress

Forums

Trying to get property of non-object in /wp-includes/nav-menu.php on line 592 ?? (4 posts)

  1. wp__developer
    Member
    Posted 1 year ago #

    Hi, im running wordpress 3.4.2 and

    I currently ran into this problem:
    I added a second wp_nav_menu(); in my header; to create a mobile phone menu. Everything works fine in the visual side, but when i turn on

    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', true);

    I get PHP notices:
    [19-Nov-2012 09:05:10 UTC] PHP Notice: Trying to get property of non-object in /var/www/wp-includes/nav-menu.php on line 592

    On my Apache2 Error log, there are even Errors which overload my log files -.-

    When I google this problem with this string;

    Trying to get property of non-object in /wp-includes/nav-menu.php on line 592

    it seems to be a common problem; but nobody wants / needs to fix it ?

    https://www.google.at/search?q=Trying+to+get+property+of+non-object+in+%2Fvar%2Fwww%2Fdemo.icsl.at%2Fwp-includes%2Fnav-menu.php+on+line+592&rlz=1C1LENP_enAT491AT491&oq=Trying+to+get+property+of+non-object+in+%2Fvar%2Fwww%2Fdemo.icsl.at%2Fwp-includes%2Fnav-menu.php+on+line+592&aqs=chrome.0.57.161&sugexp=chrome,mod=1&sourceid=chrome&ie=UTF-8#q=Trying+to+get+property+of+non-object+in+/wp-includes/nav-menu.php+on+line+592&hl=de&rlz=1C1LENP_enAT491AT491&prmd=imvns&ei=ovWpUJDuMcnKsgaGtoG4BQ&start=20&sa=N&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&fp=192604aeddc23e14&bpcl=38625945&biw=1920&bih=1038

    So however, I could nail the problem down to my call to
    wp_nav_menu( array(
    'container' => '',
    'menu_class' => 'tinymenu',
    'echo' => true,
    'before' => '',
    'after' => '',
    'link_before' => '',
    'link_after' => '',
    'depth' => 0,
    'exclude' => '290, 293, 282, 286',
    'walker' => new Roots_Nav_Walker())
    );
    But even without any parameters (only wp_nav_menu) leads to this PHP notice, and I want to fix it, because it burries me.

    Hope you can help me.

    with kind regards

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    My guess is that the problem in in your Roots_Nav_Walker() class.

  3. wp__developer
    Member
    Posted 1 year ago #

    hey, if I exclude the roots_nav_walker, it also throws the notice :(

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    What happens if you remove this second menu entirely?

Topic Closed

This topic has been closed to new replies.

About this Topic