You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is in ManualImageCropSettingsPage.php with the line $sizesSettings = self::getSettings() || array();
I added if( empty($settings) ) return array(); to your getSettings() function, and then removed the || array(); part... you could also do like $settings = empty($settings) ? array() : $settings;
Also, I noticed you try to repeatedly call unserialize on the value up to 10 times, while it's empty/not an array? get_option() and update_option() will automatically serialize/unserialize for you, and if you're unsure ever you can use maybe_serialize() which will conditionally serialize (and make sure it doesn't happen twice)!
Great plugin, super useful and user-friendly!!
The text was updated successfully, but these errors were encountered:
"Note that PHP's boolean operators always return a boolean value... as opposed to other languages that return the value of the last evaluated expression."
See this comment on php: http://php.net/manual/en/language.operators.logical.php#77411
The issue is in
ManualImageCropSettingsPage.php
with the line$sizesSettings = self::getSettings() || array();
I added
if( empty($settings) ) return array();
to yourgetSettings()
function, and then removed the|| array();
part... you could also do like$settings = empty($settings) ? array() : $settings;
Also, I noticed you try to repeatedly call unserialize on the value up to 10 times, while it's empty/not an array? get_option() and update_option() will automatically serialize/unserialize for you, and if you're unsure ever you can use maybe_serialize() which will conditionally serialize (and make sure it doesn't happen twice)!
Great plugin, super useful and user-friendly!!
The text was updated successfully, but these errors were encountered: