Title: PHP Warning: array_diff and array_merge functions expect an array
Last modified: September 18, 2021

---

# PHP Warning: array_diff and array_merge functions expect an array

 *  Resolved [Oxibug](https://wordpress.org/support/users/oxibug/)
 * (@oxibug)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-array_diff-and-array_merge-functions-expect-an-array/)
 * Hi There!
 * I noticed some issues in the access log file while using [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/)
   plugin,
 *     ```
       PHP message: PHP Warning:  array_diff(): Expected parameter 2 to be an array, string given in /wp-content/plugins/wp-smushit/core/class-settings.php on line 376
   
       PHP message: PHP Warning:  array_merge(): Expected parameter 1 to be an array, string given in /wp-content/plugins/wp-smushit/core/class-settings.php on line 378', 
       referer: /wp-admin/tools.php?page=regenerate-thumbnails
       ```
   
 * Thanks

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

 *  Plugin Support [Imran – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support9/)
 * (@wpmudev-support9)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-array_diff-and-array_merge-functions-expect-an-array/#post-14886660)
 * Hello [@oxibug](https://wordpress.org/support/users/oxibug/) !
 * Hope you’re doing well today!
 * Thank you for reporting this! I’ll create a task for our Smush team to add some
   additional checks in those files to prevent the warning from appearing.
 * As a note, from the code it looks like those warnings are harmless and PHP can
   deal with those without any additional issues, it will just let the developers
   know about this by logging this warning.
 * Kind regards,
    Pawel
 *  Plugin Support [Imran – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support9/)
 * (@wpmudev-support9)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-array_diff-and-array_merge-functions-expect-an-array/#post-14929396)
 * Hello [@oxibug](https://wordpress.org/support/users/oxibug/) !
 * As the case has been handed over to our Smush team and there’s no further discussion
   on this topic, I’ll mark the ticket as resolved for now.
 * Of course if you’d like to add something here, please feel free to do so any 
   time!
 * Warm regards,
    Pawel

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

The topic ‘PHP Warning: array_diff and array_merge functions expect an array’ is
closed to new replies.

 * ![](https://ps.w.org/wp-smushit/assets/icon-256x256.gif?rev=3447113)
 * [Smush – Image Optimization, Compression, Lazy Load, WebP & CDN](https://wordpress.org/plugins/wp-smushit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-smushit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-smushit/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-smushit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-smushit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-smushit/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [Imran – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support9/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-array_diff-and-array_merge-functions-expect-an-array/#post-14929396)
 * Status: resolved