unserialize issue, suggest to use maybe_unserialize function
-
Hi there,
Thank you for the plugin. I’m having an issue with “Warning: unserialize() expects parameter 1 to be string, array given” when using along with the docket cache plugin.
I would like to suggest changing the “unserialize” function to “maybe_unserialize” to solve this issue.
For example,
File: ultimate_social_media_icons.php
Line: 114Before:
function sfsi_error_reporting() { $option5 = unserialize(get_option('sfsi_section5_options', false)); if ( isset($option5['sfsi_icons_suppress_errors']) && !empty($option5['sfsi_icons_suppress_errors']) && "yes" == $option5['sfsi_icons_suppress_errors'] ) { error_reporting(0); } }
After:
function sfsi_error_reporting() { $option5 = maybe_unserialize(get_option('sfsi_section5_options', false)); if ( isset($option5['sfsi_icons_suppress_errors']) && !empty($option5['sfsi_icons_suppress_errors']) && "yes" == $option5['sfsi_icons_suppress_errors'] ) { error_reporting(0); } }
Thanks.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘unserialize issue, suggest to use maybe_unserialize function’ is closed to new replies.