Warning: array_filter() expects parameter

Modern, responsive, unique and elegant one-page WordPress theme to showcase your creativity
GK User
Sat Aug 31, 2013 7:09 am
Warning: array_filter() expects parameter 1 to be array, boolean given in /wp-content/themes/Creativity/gavern/form_elements/Fonts/fonts.php on line 96

Warning: array_values() expects parameter 1 to be array, null given in /wp-content/themes/Creativity/gavern/form_elements/Fonts/fonts.php on line 97


Hope somebody could teach me how to solve it ?Thanks.
User avatar
Fresh Boarder

GK User
Sat Aug 31, 2013 12:10 pm
Hi,

Do you have any directories in the fonts catalog inside the theme?
User avatar
Administrator

GK User
Thu Sep 19, 2013 12:10 am
dziudek wrote:Hi,

Do you have any directories in the fonts catalog inside the theme?


Hi,
I dont have, and it happened when I updated to 1.2.1 edition.
User avatar
Fresh Boarder

GK User
Thu Sep 19, 2013 7:41 am
In this case please open the mentioned in warning fonts.php file and please change line:

Code: Select all
$squirrel_fonts = array_filter($squirrel_fonts);
$squirrel_fonts = array_values($squirrel_fonts);


to:

Code: Select all
if(is_array($squirrel_fonts)) {
    $squirrel_fonts = array_filter($squirrel_fonts);
    $squirrel_fonts = array_values($squirrel_fonts);
} else {
    $squirrel_fonts = array();
}


We will add this fix to the nearest theme update.
User avatar
Administrator


cron