Title: Uncaught TypeError: explode()
Last modified: July 26, 2023

---

# Uncaught TypeError: explode()

 *  Resolved [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/uncaught-typeerror-explode-2/)
 * Hi, we’re getting this error in the Activity log since the update:
 *     ```wp-block-code
       [2023-07-26 09:07:04] Setting up
       [2023-07-26 09:07:05] Error: (1) Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in /home/xxx/xxx/wp-content/plugins/simply-static/src/tasks/class-ss-fetch-urls-task.php:271
       Stack trace:
       #0 /home/xxx/xxx/wp-content/plugins/simply-static/src/tasks/class-ss-fetch-urls-task.php(271): explode()
       #1 /home/xxx/xxx/wp-content/plugins/simply-static/src/tasks/class-ss-fetch-urls-task.php(61): Simply_Static\Fetch_Urls_Task->find_excludable()
       #2 /home/xxx/xxx/wp-content/plugins/simply-static/src/class-ss-archive-creation-job.php(142): Simply_Static\Fetch_Urls_Task->perform()
       #3 /home/xxx/xxx/wp-content/plugins/simply-static/vendor/a5hleyrich/wp-background-processing/classes/wp-background-process.php(514): Simply_Static\Archive_Creation_Job->task()
       #4 /home/xxx/xxx/wp-content/plugins/simply-static/vendor/a5hleyrich/wp-background-processing/classes/wp-background-process.php(335): WP_Background_Process->handle()
       #5 /home/xxx/xxx/wp-includes/class-wp-hook.php(308): WP_Background_Process->maybe_handle()
       #6 /home/xxx/xxxm/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
       #7 /home/xxx/xxx/wp-includes/plugin.php(517): WP_Hook->do_action()
       #8 /home/xxx/xxx/wp-admin/admin-ajax.php(188): do_action()
       #9 {main}
         thrown in /home/xxx/xxx/wp-content/plugins/simply-static/src/tasks/class-ss-fetch-urls-task.php on line 271
       ```
   
 * No static files are created anymore…

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

 *  Thread Starter [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/uncaught-typeerror-explode-2/#post-16925286)
 * Update: I found the following weird thing in the plugin settings.
 * ![](https://i0.wp.com/kairntech.com/doc/wp-content/uploads/sites/2/2023/07/Schermafdruk-
   van-2023-07-26-20-25-43.png?ssl=1)
 * No idea how that got there (maybe a conversion issue after an upgrade?) but after
   clearing the field, the fatal error has gone…
 * Please make sure to sanitize user input 🙂
 *  Plugin Author [patrickposner](https://wordpress.org/support/users/patrickposner/)
 * (@patrickposner)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/uncaught-typeerror-explode-2/#post-16926319)
 * Hey [@ravanh](https://wordpress.org/support/users/ravanh/),
 * thanks for your report!
 * It seems the auto-migration wasn’t finished on your installation, but I’m glad
   you found one of two ways to handle that.
 * The other, more “official” way would have been using Simply Static -> Settings-
   > Utilities-> Migrate Settings.
 * We do escape all input on saving settings, but we switched the field type of 
   that particular setting from a nested array of objects to just an array.
 * We also convert it on migration, but if that one doesn’t trigger, we don’t have
   a way to touch the setting otherwise 🙂
 * Cheers,
   Patrick
 *  Thread Starter [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/uncaught-typeerror-explode-2/#post-16927961)
 * Ok, I wish I’d known about the manual migration option before. This happened 
   on a WordPress Multsite where the plugin is active on a sub-site and auto-updating
   is activated on the network level.
 * So I would guess that would explain the upgrade process being skipped on the 
   sub-site?
 * In what DB table/entry is that setting stored? I might be able to retrieve the
   old setting from a backup without having to revert all other tables and loose
   new posts and page modifications…
 *  Plugin Author [patrickposner](https://wordpress.org/support/users/patrickposner/)
 * (@patrickposner)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/uncaught-typeerror-explode-2/#post-16935612)
 * Hey [@ravanh](https://wordpress.org/support/users/ravanh/),
 * it should auto-upgrade, but we already got some reports where this might have
   failed for that particular field.
 * The old value is stored in the option “simply-static” with the key “urls_to_exclude”
 * You can clear it like this:
 *     ```wp-block-code
       $options = get_option('simply-static');
   
       unset($options['urls_to_exclude']);
       update_option('simply-static', $options );
       ```
   
 *  Thread Starter [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/uncaught-typeerror-explode-2/#post-16936680)
 * Hi Patrick, thanks 🙂

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

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

 * ![](https://ps.w.org/simply-static/assets/icon-256x256.png?rev=2443263)
 * [Simply Static - The Static Site Generator](https://wordpress.org/plugins/simply-static/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simply-static/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simply-static/)
 * [Active Topics](https://wordpress.org/support/plugin/simply-static/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simply-static/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simply-static/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/uncaught-typeerror-explode-2/#post-16936680)
 * Status: resolved