Title: Error while saving settings
Last modified: October 28, 2022

---

# Error while saving settings

 *  Resolved [jcmanlangit](https://wordpress.org/support/users/jcmanlangit/)
 * (@jcmanlangit)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-while-saving-settings-2/)
 * Hello good day,
 * Would like to ask help
 * First time using the plugin, And as I was saving some settings especially the“
   Buckets to optimize”, but after saving I got an error
 * [28-Oct-2022 02:42:24 UTC] PHP Fatal error: Uncaught TypeError: explode(): Argument#
   2 ($string) must be of type string, array given in /nas/content/live/ilsau01/
   wp-content/plugins/s3-image-optimizer/s3-image-optimizer.php:414
    Stack trace:#
   0 /nas/content/live/ilsau01/wp-content/plugins/s3-image-optimizer/s3-image-optimizer.
   php(414): explode(‘\n’, Array) #1 /nas/content/live/ilsau01/wp-includes/class-
   wp-hook.php(309): s3io_bucketlist_sanitize(Array) #2 /nas/content/live/ilsau01/
   wp-includes/plugin.php(191): WP_Hook->apply_filters(Array, Array) #3 /nas/content/
   live/ilsau01/wp-includes/formatting.php(4988): apply_filters(‘sanitize_option…’,
   Array, ‘s3io_bucketlist’, Array) #4 /nas/content/live/ilsau01/wp-includes/option.
   php(614): sanitize_option(‘s3io_bucketlist’, Array) #5 /nas/content/live/ilsau01/
   wp-includes/option.php(472): add_option(‘s3io_bucketlist’, Array, ”, ‘yes’) #
   6 /nas/content/live/ilsau01/wp-admin/options.php(322): update_option(‘s3io_bucketlist’,
   Array) #7 {main} thrown in /nas/content/live/ilsau01/wp-content/plugins/s3-image-
   optimizer/s3-image-optimizer.php on line 414
 * Do you have any idea why is this and how to fix this one?
 * Thanks
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-while-saving-settings-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-while-saving-settings-2/#post-16143068)
 * Yeah, that error is definitely from saving the Buckets to optimize, but normally
   that value should be a string, coming directly from the textarea field. I’m not
   quite sure how it ever gets to be an array prior to the sanitation step.
 * Could you take a screenshot of exactly what you are putting in the buckets field?*
   feel free to crop out anything else that is sensitive data.
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/error-while-saving-settings-2/#post-16186497)
 * Version 2.4.3 has a double-check that should prevent any errors during saving
   the buckets, so let me know if you encounter any additional errors!

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

The topic ‘Error while saving settings’ is closed to new replies.

 * ![](https://ps.w.org/s3-image-optimizer/assets/icon-256x256.jpg?rev=2816100)
 * [S3 Image Optimizer](https://wordpress.org/plugins/s3-image-optimizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/s3-image-optimizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/s3-image-optimizer/)
 * [Active Topics](https://wordpress.org/support/plugin/s3-image-optimizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/s3-image-optimizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/s3-image-optimizer/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/error-while-saving-settings-2/#post-16186497)
 * Status: resolved