PHP Warning: Declaration of Bootstrap_Walker_Nav_Menu::start_lvl

This support request was posted in Smart by graphicz

Request ID #40741 In Progress
  • Using the search box gives error: There has been a critical error on this website

    Error log shows: PHP Warning: Declaration of Bootstrap_Walker_Nav_Menu::start_lvl(&$output, $depth) should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = NULL) in /home/grapcouk/public_html/blog/wp-content/themes/smartwp/functions/function-extras.php on line 51

    I changed function-extras.php like this:

    // function start_lvl( &$output, $depth ) {
    function start_lvl(&$output, $depth = 0, $args = NULL) {

    Search still shows error.

    Log now shows:

    [12-Jan-2021 08:59:06 UTC] PHP Parse error: syntax error, unexpected ‘new’ (T_NEW) in /home/grapcouk/public_html/blog/wp-content/themes/smartwp/search.php on line 25

    [12-Jan-2021 09:01:26 UTC] PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘load_dashicons’ not found or invalid function name in /home/grapcouk/public_html/blog/wp-includes/class-wp-hook.php on line 287

    Please can you advise? Thank you.

    For anyone else it is a php 7 thing.

    Find functions.php or functions-extras.php and ensure this is at the bottom:

         function ww_load_dashicons(){
             wp_enqueue_style('dashicons');
         }
    
         add_action('wp_enqueue_scripts', 'ww_load_dashicons', 999);

    in search php change $allsearch = & new WP_Query to $allsearch = new WP_Query

    Hi,

    Thank you for reaching out to us, I hope you had a good start of 2021!

    And thank you for reporting this. We’ll be following your finding regarding PHP7 compatibility and updating accordingly.

    Best,
    Juan.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Login to your Account

Welcome back! Please log in to your account by filling the fields below:

Forgot?

Not a member? Create a free account.

Create a Free Account

You're 27 seconds away from some awesome WordPress free stuff, benefits and more. Create a free account and have access to our free products, benefits and more!

Already have an account? Log in
Secure Server