Title: Uncaught TypeError: array_merge()
Last modified: July 26, 2022

---

# Uncaught TypeError: array_merge()

 *  Resolved [nineplanetsllc](https://wordpress.org/support/users/nineplanetsllc/)
 * (@nineplanetsllc)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/uncaught-typeerror-array_merge/)
 * On a site we recently upgraded to the latest version of Litespeed Cache, we started
   getting this when trying to access the admin (we’ve 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
       ```
   

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/uncaught-typeerror-array_merge/#post-15861823)
 * Hi,
 * May I know what is the PHP version and WordPress version ?
 * Best regards,
 *  Thread Starter [nineplanetsllc](https://wordpress.org/support/users/nineplanetsllc/)
 * (@nineplanetsllc)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/uncaught-typeerror-array_merge/#post-15861828)
 * WordPress 6.0.1 and PHP 8.0.
 *  Plugin Support [Hai Zheng⚡](https://wordpress.org/support/users/hailite/)
 * (@hailite)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/uncaught-typeerror-array_merge/#post-15861862)
 * Please try v5.0.0.1
 *  [Bruno Cantuaria](https://wordpress.org/support/users/cantuaria/)
 * (@cantuaria)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/uncaught-typeerror-array_merge/#post-15862112)
 * 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 I’m 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 it’s 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. I’ve created
   a pull request on git for that:
 * [https://github.com/litespeedtech/lscache_wp/pull/474](https://github.com/litespeedtech/lscache_wp/pull/474)
 *  [cyberloner](https://wordpress.org/support/users/cyberloner/)
 * (@cyberloner)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/uncaught-typeerror-array_merge/#post-15862189)
 * 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
       ```
   
    -  This reply was modified 3 years, 10 months ago by [cyberloner](https://wordpress.org/support/users/cyberloner/).
 *  Plugin Support [Hai Zheng⚡](https://wordpress.org/support/users/hailite/)
 * (@hailite)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/uncaught-typeerror-array_merge/#post-15864019)
 * [@cantuaria](https://wordpress.org/support/users/cantuaria/) Thanks for your 
   PR.
 * v5.0.1 to fix this issue will be released soon.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Uncaught TypeError: array_merge()’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 6 replies
 * 5 participants
 * Last reply from: [Hai Zheng⚡](https://wordpress.org/support/users/hailite/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/uncaught-typeerror-array_merge/#post-15864019)
 * Status: resolved