Warning: array_keys() & max(). WordPress 4.7

  • Sticky
    Posted in: WPJobus  

  • Keymaster
    Roman Bitca
    December 20, 2016 at 9:19 am #18769

    Warning: array_keys() expects parameter 1 to be array, object given in /home/inin3486/public_html/wordpress/wp-content/themes/classiera/inc/colors.php

    Warning: max(): When only one parameter is given, it must be an array in /home/inin3486/public_html/wordpress/wp-content/themes/classiera/inc/colors.php

    ______________________________________________________________________________________

    Hello,
    After updating your WordPress Theme to the latest version, you might see some errors.
    Under you can find a link with a file you need to replace, for getting thinks works fine. colors.php.
    Or you can edit the file by your self.

    The problem is on line 7, that looks like:

    Incorrect:
    $lowest_priority = max(array_keys($wp_filter[‘wp_head’]));

    Correct:
    $lowest_priority = max(array_keys($wp_filter[‘wp_head’]->callbacks));

    LINK:
    http://romanbitca.me/files/colors.php.zip

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.