• Resolved moonartis

    (@moonartis)


    After update i have php notice and warning:

    Notice: Undefined index: User is logged in in /wp-content/plugins/if-menu/if-menu.php on line 116
    
    Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /wp-content/plugins/if-menu/if-menu.php on line 116
Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter moonartis

    (@moonartis)

    0.8.1 didn’t fix that

    doudou12

    (@doudou12)

    I have the same problem, and didnt’t fix

    patrice06

    (@patrice06)

    Same problem for me. Help

    Jmantis

    (@jmantis)

    Same problem… how to download previous version?

    • This reply was modified 7 years ago by Jmantis.
    Plugin Author Andrei

    (@andreiigna)

    Hi,

    Thanks for letting me know about this.

    The issue comes from an older version of the plugin, which used rule names instead of IDs as a reference. This change in latest version was necessary to provide better support for If Menu on sites with multiple languages.

    The issue wasn’t reproduced on our QA phase and we missed it, sorry about the inconvenience. There are 2 solutions for fixing this:

    • update to latest version 0.8.2 which now includes support for previous data format
    • Visit menu pages in WP Admin and save the rules again

    Cheers

    patrice06

    (@patrice06)

    0.8.2 works fine, thank’s a lot.

    doudou12

    (@doudou12)

    Yeah, thanks, all it’s okay

    andytela

    (@andymoonshine)

    Hi

    Also get this in v0.8.3

    PHP Notice: Undefined index: id in /if-menu/if-menu.php on line 67

    Just needs a condition around it e.g.

    if (isset($condition['id'])) {
    	$c2[$condition['id']] = $condition;
    }

    Cheers
    Andy

    Plugin Author Andrei

    (@andreiigna)

    Hi Andy,

    Looks like in your case the id parameters is missing for a condition. This may happen if a theme or plugin adds extra conditions with missing id.
    The code suggested is just a workaround, adding the missing parameter to custom conditions would be preferred

    Cheers

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘php warnings’ is closed to new replies.