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!
-
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.
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.
Same issue. Maybe that’s why I uninstalled it… .
-
This reply was modified 6 years, 1 month ago by
JJNW.
Hi @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.
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.
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.

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 and see if it tells you anything.
Yup – not your plugin!
Its Content Control Plugin conflicting with it.
https://ww.wp.xz.cn/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.
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!
Like? I think love is more descriptive Ahahah
Seriously, awesome.
Thanks, and I hope the other developer can help out.
-
This reply was modified 6 years, 1 month ago by
The topic ‘Warning PHP: Warning: explode() expects parameter 2 to be string’ is closed to new replies.