Title: Warning PHP: Warning: explode() expects parameter 2 to be string
Last modified: April 21, 2020

---

# Warning PHP: Warning: explode() expects parameter 2 to be string

 *  Resolved [JJNW](https://wordpress.org/support/users/jjnw/)
 * (@jjnw)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/warning-php-warning-explode-expects-parameter-2-to-be-string/)
 * Hello, I click options in Widget and it doesn’t stick, just resets.
 * Check php error log and saw this: Warning PHP: Warning: explode() expects parameter
   2 to be string, array given in wordpress-popular-posts\src\Widget\form.php on
   line 62 `$tax_filter = [];`
 * Any suggestions?
 * Thank you!

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

 *  Thread Starter [JJNW](https://wordpress.org/support/users/jjnw/)
 * (@jjnw)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/warning-php-warning-explode-expects-parameter-2-to-be-string/#post-12710637)
 * And on widget area, on front end, I get `Warning: Illegal string offset 'name'
   in wordpress-popular-posts\src\Output.php on line 168`
    -  This reply was modified 6 years, 1 month ago by [JJNW](https://wordpress.org/support/users/jjnw/).
 *  Thread Starter [JJNW](https://wordpress.org/support/users/jjnw/)
 * (@jjnw)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/warning-php-warning-explode-expects-parameter-2-to-be-string/#post-12710642)
 * Should note, the plugin was working, 3 months ago, when I first tried it on my
   dev site, now I tried new version and it’s not. Let me reinstall old plugin and
   see what happens.
 *  Thread Starter [JJNW](https://wordpress.org/support/users/jjnw/)
 * (@jjnw)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/warning-php-warning-explode-expects-parameter-2-to-be-string/#post-12710659)
 * Same issue. Maybe that’s why I uninstalled it… .
    -  This reply was modified 6 years, 1 month ago by [JJNW](https://wordpress.org/support/users/jjnw/).
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/warning-php-warning-explode-expects-parameter-2-to-be-string/#post-12710715)
 * Hi [@jjnw](https://wordpress.org/support/users/jjnw/),
 * No idea to be honest. The information you have shared so far doesn’t say a lot
   to me. You’ll need to share more info (like reproduction steps, screenshots, 
   etc) so I can help.
 *  Thread Starter [JJNW](https://wordpress.org/support/users/jjnw/)
 * (@jjnw)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/warning-php-warning-explode-expects-parameter-2-to-be-string/#post-12710755)
 * Okay, here are the steps.
 * Install, activate, default settings (in settings page, Tools).
 * Go to Appearance > Widgets place widget in widget area.
 * Un-select show views (counts) – Save button = the checkbox comes back.
 * Go to front-end, that where you’ll see error too (without wp-config show WP errors
   enabled).
 * I am using Kleo theme.
 * I’m gonna need to chase down plugin conflicts too.
 * Thanks.
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/warning-php-warning-explode-expects-parameter-2-to-be-string/#post-12710960)
 * Followed your instructions on a new WordPress setup and couldn’t reproduce the
   issue (no other plugins active, stock Twenty Twenty theme). The widget was able
   to save the settings normally.
 * ![Drag-and-drop of the WPP widget into a sidebar, options saving normally as 
   expected](https://i0.wp.com/i.postimg.cc/k4Qv6dZS/drag-and-drop-wpp-widget-in-
   admin-area.gif?ssl=1)
 * Checked the debug.log file as well and it’s clean, no PHP notice/warning/error
   messages were logged by WordPress.
 * Try using the [Troubleshooting mode](https://make.wordpress.org/support/handbook/appendix/troubleshooting-using-the-health-check/)
   and see if it tells you anything.
 *  Thread Starter [JJNW](https://wordpress.org/support/users/jjnw/)
 * (@jjnw)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/warning-php-warning-explode-expects-parameter-2-to-be-string/#post-12710989)
 * Yup – not your plugin!
 * Its Content Control Plugin conflicting with it.
    `https://wordpress.org/plugins/
   content-control/`
 * Both are great plugins – yours obviously wins this battle for Seattle.
 * Thank you for your help and patience.
 * All’s good in la hood.
 * AWESOME PLUGIN.
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/warning-php-warning-explode-expects-parameter-2-to-be-string/#post-12711010)
 * Awesome, thanks for the heads-up!
 * I’ll see if I can find some spare time to check out that plugin you mentioned
   and maybe figure out what’s going on. I’m sure its developer would want to know
   about this issue as well. If so, I’ll make sure to leave a comment here to keep
   you (and anyone reading this) updated.
 * Anyways, thanks for the kind words. I’m glad you like my plugin!
 *  Thread Starter [JJNW](https://wordpress.org/support/users/jjnw/)
 * (@jjnw)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/warning-php-warning-explode-expects-parameter-2-to-be-string/#post-12711018)
 * Like? I think love is more descriptive Ahahah
 * Seriously, awesome.
 * Thanks, and I hope the other developer can help out.

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

The topic ‘Warning PHP: Warning: explode() expects parameter 2 to be string’ is 
closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

## Tags

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

 * 9 replies
 * 2 participants
 * Last reply from: [JJNW](https://wordpress.org/support/users/jjnw/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/warning-php-warning-explode-expects-parameter-2-to-be-string/#post-12711018)
 * Status: resolved