Uncaught TypeError: array_merge()




Wordpress LScache Plugin: Uncaught TypeError: array_merge()

Last Updated on: Wed, 15 Apr 2026 00:00:02
On a site we recently upgraded to the latest version of Litespeed Cache, we started getting this when trying to access the admin (weve since rolled back to 4.6 to get things working again): Error Details ============= An error of type E_ERROR was caused in line 583 of the file /home/example/domains/example.com/public_html/wp-content/plugins/litespeed-cache/src/root.cls.php. Error message: Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in /home/example/domains/example.com/public_html/wp-content/plugins/litespeed-cache/src/root.cls.php:583 Stack trace: #0 /home/example/domains/example.com/public_html/wp-content/plugins/litespeed-cache/src/root.cls.php(583): array_merge() #1 /home/example/domains/example.com/public_html/wp-content/plugins/litespeed-cache/tpl/banner/new_version.php(24): LiteSpeed Root::save_summary() #2 /home/example/domains/example.com/public_html/wp-content/plugins/litespeed-cache/src/gui.cls.php(354): include(/home/example/...) #3 /home/example/domains/example.com/public_html/wp-content/plugins/litespeed-cache/src/admin-display.cls.php(185): LiteSpeed GUI->show_promo() #4 /home/example/domains/example.com/public_html/wp-includes/class-wp-hook.php(307): LiteSpeed Admin_Display->enqueue_scripts() #5 /home/example/domains/example.com/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #6 /home/example/domains/example.com/public_html/wp-includes/plugin.php(476): WP_Hook->do_action() #7 /home/example/domains/example.com/public_html/wp-admin/admin-header.php(118): do_action() #8 /home/example/domains/example.com/public_html/wp-admin/index.php(137): require_once(/home/example/...) #9 main thrown Hi, May I know what is the PHP version and WordPress version ? Best regards, WordPress 6.0.1 and PHP 8.0. Please try v5.0.0.1 This issue also happened here. Completely blocked the dashboard, luckily the frontend kept working. Not sure what triggered the issue, nor what effects it could cause, but Im not entirely sure that the 5.0.0.1 fix will prevent this to happen again. The error happens on line 583 of file litespeed-cache/src/root.cls.php , because there is no check to confirm that the variable $existing_summary is in fact an array, if its not it will return a Fatal error blocking the entire dashboard. As such, I advise to verify on line 580 if that variable is an array. Ive created a pull request on git for that: https://github.com/litespeedtech/lscache_wp/pull/474 auto update plugin and it kill our admin page? WordPress version 6.0.1 Current plugin: LiteSpeed Cache (version 5.0) PHP version 8.1.6 Error Details ============= An error of type E_ERROR was caused in line 583 of the file /var/www/html/wp-content/plugins/litespeed-cache/src/root.cls.php. Error message: Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in /var/www/html/wp-content/plugins/litespeed-cache/src/root.cls.php:583 Stack trace: #0 /var/www/html/wp-content/plugins/litespeed-cache/src/root.cls.php(583): array_merge() #1 /var/www/html/wp-content/plugins/litespeed-cache/tpl/banner/new_version.php(24): LiteSpeed Root::save_summary() #2 /var/www/html/wp-content/plugins/litespeed-cache/src/gui.cls.php(354): include(...) #3 /var/www/html/wp-content/plugins/litespeed-cache/src/admin-display.cls.php(185): LiteSpeed GUI->show_promo() #4 /var/www/html/wp-includes/class-wp-hook.php(307): LiteSpeed Admin_Display->enqueue_scripts() #5 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #6 /var/www/html/wp-includes/plugin.php(476): WP_Hook->do_action() #7 /var/www/html/wp-admin/admin-header.php(118): do_action() #8 /var/www/html/wp-admin/index.php(137): require_once(...) #9 main thrown @cantuaria Thanks for your PR. v5.0.1 to fix this issue will be released soon.



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference