PHP Warning: unserialize() expects parameter 1 to be string, array given
-
The php log shows countless warnings from your plugin like:
PHP Warning: unserialize() expects parameter 1 to be string, array given in ultimate_social_media_icons.php on line 114.
Your code contains about 200 occurrences of this code pattern:
unserialize(get_option(...))
while the WP function get_option() already calls maybe_unserialize(). So unserialize() should not be called on results of get_option().If for some reason you stil expect to get serialized data, use maybe_unserialize(), but I could not find any pattern of that in any code of other plugins or in core itself in my current project.
So, it would be nice if you could correct this in your next version.
Thanks,
Erwin Derksen | Buro RaDer
- The topic ‘PHP Warning: unserialize() expects parameter 1 to be string, array given’ is closed to new replies.