• when i was update my wordpress, this message out in my home page,

    “Warning: preg_grep() expects parameter 2 to be array, boolean given in /home1/mayrindo/public_html/djavavista.co.id/wp-content/plugins/font-awesome-4-menus/n9m-font-awesome-4.php on line 216”

    If i delete the plug in font awesome 4 menus, this message still in there.

    Any resolution for this ?

    https://www.ads-software.com/plugins/font-awesome-4-menus/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Unfortunately, I have encountered the same problem. I can not find solution.

    Same here..but when I deactivated the font awesome plugin all ok..

    Found the fix:

    Just replace bunch of following code in /n9m-font-awesome-4.php:

    function walker_nav_menu_start_el( $item_output, $item, $depth, $args ){
    $classes = preg_grep( ‘/^(fa)(-\S+)?$/i’, $item->classes );
    if( !empty( $classes ) ){
    $item_output = $this->replace_item( $item_output, $classes );
    }
    return $item_output;
    }

    with this Repalcement code:

    function walker_nav_menu_start_el( $item_output, $item, $depth, $args ){
    if (is_array($item->classes)) {
    $classes = preg_grep( ‘/^(fa)(-\S+)?$/i’, $item->classes );
    if( !empty( $classes ) ){
    $item_output = $this->replace_item( $item_output, $classes );
    }
    }

    return $item_output;
    }

    all works now!!!

    very very thanks ??

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘preg_grep() expects parameter 2 to be array, boolean given in’ is closed to new replies.