• Resolved eugene212

    (@eugene212)


    Thanks for providing such a good plugin as Hummingbird !

    I have used it for a while on one of my WP sites without any issues and started to use it on another site, but at some stage entering Hummingbird’s dashboard, etc. became impossible – critical error is shown.

    Deactivating all other plugins did not help, so please advise !

    Please see below WP emailed details:

    When seeking help with this issue, you may be asked for some of the following information: WordPress version 6.1.1 Active theme: Colibri WP (version 1.0.89) Current plugin: Hummingbird (version 3.4.0) PHP version 8.0.26
    Error Details
    =============
    An error of type E_ERROR was caused in line 130 of the file /var/www/html/wp-content/plugins/hummingbird-performance/core/class-module-server.php. Error message: Uncaught TypeError: strtolower(): Argument #1 ($string) must be of type string, array given in /var/www/html/wp-content/plugins/hummingbird-performance/core/class-module-server.php:130
    Stack trace:
    #0 /var/www/html/wp-content/plugins/hummingbird-performance/core/class-module-server.php(130): strtolower(Array)
    #1 /var/www/html/wp-content/plugins/hummingbird-performance/core/class-utils.php(282): Hummingbird\Core\Module_Server::get_server_type()
    #2 /var/www/html/wp-content/plugins/hummingbird-performance/core/class-utils.php(254): Hummingbird\Core\Utils::get_tracking_data()
    #3 /var/www/html/wp-content/plugins/hummingbird-performance/admin/class-page.php(280): Hummingbird\Core\Utils::enqueue_admin_scripts(‘3.4.0’)
    #4 /var/www/html/wp-includes/class-wp-hook.php(308): Hummingbird\Admin\Page->enqueue_scripts(‘toplevel_page_w…’)
    #5 /var/www/html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
    #6 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #7 /var/www/html/wp-admin/admin-header.php(118): do_action(‘admin_enqueue_s…’, ‘toplevel_page_w…’)
    #8 /var/www/html/wp-admin/admin.php(239): require_once(‘/var/www/html/w…’)
    #9 {main} thrown
    • This topic was modified 3 years, 4 months ago by eugene212.
Viewing 3 replies - 16 through 18 (of 18 total)
  • Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @eugene212,

    Can you please try the following snippet instead of editing the plugin core file?

    <?php
    add_filter( 'http_response', function( $response, $parsed_args, $url ){
    	if( $parsed_args['method'] === 'HEAD' && strpos( $url, 'wphb-check-cf' ) && ! empty( $response['headers']['server'] ) && is_array( $response['headers']['server'] ) ){
    		$response['headers']['server'] = implode( '/', $response['headers']['server'] );
    	}
    	return $response;
    }, 10, 3 );

    Please let us know how that goes.

    Kind Regards,
    Nebu John

    Thread Starter eugene212

    (@eugene212)

    Hi @wpmudevsupport14,

    I had no intention to make permanent change of the plugin core code, rather I tried to help your developers with my observations for issue debugging.

    The last snippet by itself produces the original error, but combined with the previous snippet code as “else if” case it seems to work, thank you:

    <?php
    add_filter( 'http_response', function( $response, $parsed_args, $url ){
    	if( $parsed_args['method'] === 'GET' && $url === home_url() && ! empty( $response['headers']['server'] ) && is_array( $response['headers']['server'] ) ){
    		$response['headers']['server'] = 'Caddy';
    	}
    	else if( $parsed_args['method'] === 'HEAD' && strpos( $url, 'wphb-check-cf' ) && ! empty( $response['headers']['server'] ) && is_array( $response['headers']['server'] ) ){
    		$response['headers']['server'] = implode( '/', $response['headers']['server'] );
    	}
    	return $response;
    }, 10, 3 );
    
    Plugin Support Jair – WPMU DEV Support

    (@wpmudevsupport15)

    Hi @eugene212

    Thanks for the information. We are marking this thread as resolved.
    Please let us know in case you need help about another issue.

    Kind regards,
    Zafer

Viewing 3 replies - 16 through 18 (of 18 total)

The topic ‘Cannot enter dashboard’ is closed to new replies.