[Fix for version 4.6.3.2 ] How to fix Font Awesome 4 Menus “Warning: preg_grep()

spot_img

Share

Changelog for Font Awesome 4 Menus

  • 4.6.3.2
    Adds fix to errors generated by nav_menu_css_class() by removing unused parameters

This WordPress Plugin allows you to add Font Awesome 4 icons to your WordPress menus or anywhere on your site without any programming.

You might have updated the Font Awesome plugin to the latest version and you have receiving these warnings on the top menu of your pages.

Warning: preg_grep() expects parameter 2 to be array, boolean given in /****/home/wp-content/plugins/font-awesome-4-menus/n9m-font-awesome-4.php on line 216.

We have tested the following fix working in PHP version 5.4.44. This post will help to fix the warning message on the top menu of your WordPress website. New Nine developers are working on this issue and may be fixed in the next update. Till then you can apply the below fix to overcome the warning text.

NOTE: We are not responsible for any damage/loss occurred while changing the code of your blog. We have just shared our tested code which worked for us, and may or may not work for all themes. You will be the sole responsibility any further issues due to code edit. It is recommend to keep a backup and test in a demo website before applying into the main site.

The warning can be hidden by changing the code at line 215 with the code below.

How to replace the code at line 215 in Font Awesome 4 Menus?

Please follow the steps below…

  • Login to the Cpanel and open the File manager.
  • Now go to Public HTML folder and in wp-content >> plugins >> font-awesome-4-menus
  • Open the php file n9m-font-awesome-4.php and edit and replace the lines with the above code and save the file.
  • Now open your website it should not show the warning message now.

Leave a Reply

Read more

More for you