Title: Fatal Error: must be array, null given
Last modified: February 17, 2025

---

# Fatal Error: must be array, null given

 *  Resolved [jakramer](https://wordpress.org/support/users/jakramer/)
 * (@jakramer)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/fatal-error-must-be-array-null-given/)
 * Greetings,
 * We’re getting the following fatal error with metaslider 3.96.0 with php8.2:
 * [17-Feb-2025 18:02:15 UTC] PHP Fatal error: Uncaught TypeError: array_merge():
   Argument #1 must be of type array, null given in /home/site/public_html/wp-content/
   plugins/ml-slider/inc/slider/metaslider.flex.class.php:592
 * I saw a similar issue from around 9 months ago that suggests this may be due 
   to a change in type handling between php7 and php8.
 * Looking at line 592:
 *     ```wp-block-code
       $options['start'] = array_merge($options['start'], [$script]);
       ```
   
 * $options[‘start’] is null when the code is reached. Ideally, $options[‘start’]
   would not be null here, but stuff happens, so even if the root cause of it being
   null is addressed, it’s still good to verify before using. For now, I’ve added
   the following in my copy (directly before line 592) which solved the problem 
   for us:
 *     ```wp-block-code
       if (is_null($options['start'])){  $options['start'] = array();}
       ```
   
 * Can you have a look and see if this, or a different solution, can be added to
   the plugin?
 * Thank you,
 * Julieanne

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

 *  Plugin Author [htmgarcia](https://wordpress.org/support/users/htmgarcia/)
 * (@htmgarcia)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/fatal-error-must-be-array-null-given/#post-18311613)
 * Hi [@jakramer](https://wordpress.org/support/users/jakramer/)
 * thanks for reporting this issue. We’ll prepare an updated version with the fix.
 * Regards
 *  Plugin Author [htmgarcia](https://wordpress.org/support/users/htmgarcia/)
 * (@htmgarcia)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/fatal-error-must-be-array-null-given/#post-18311627)
 * [@jakramer](https://wordpress.org/support/users/jakramer/) if you have a chance,
   please [install this version](https://drive.google.com/file/d/1LdTMJduBfX1yGAPQZD6VReYabCtPkztX/view?usp=sharing)
   and confirm the issue is solved
 * We appreciate your feedback!
 * Regards
 *  Thread Starter [jakramer](https://wordpress.org/support/users/jakramer/)
 * (@jakramer)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/fatal-error-must-be-array-null-given/#post-18313700)
 * Yes, the version you linked above is working for us. Thanks so much for the quick
   response!
 *  Plugin Author [Steve Burge](https://wordpress.org/support/users/stevejburge/)
 * (@stevejburge)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/fatal-error-must-be-array-null-given/#post-18328545)
 * That’s great to hear. Thanks for the quick report, [@jakramer](https://wordpress.org/support/users/jakramer/)

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

The topic ‘Fatal Error: must be array, null given’ is closed to new replies.

 * ![](https://ps.w.org/ml-slider/assets/icon.svg?rev=3523572)
 * [Slider, Gallery, and Carousel by MetaSlider - Image Slider, Video Slider](https://wordpress.org/plugins/ml-slider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ml-slider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ml-slider/)
 * [Active Topics](https://wordpress.org/support/plugin/ml-slider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ml-slider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ml-slider/reviews/)

## Tags

 * [fatal](https://wordpress.org/support/topic-tag/fatal/)

 * 4 replies
 * 3 participants
 * Last reply from: [Steve Burge](https://wordpress.org/support/users/stevejburge/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/fatal-error-must-be-array-null-given/#post-18328545)
 * Status: resolved