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
After upgrading to version 1.6.0, my site is crashing while displaying any page. Looking at the PHP error log, I see:
PHP Fatal error: Uncaught TypeError: Argument 1 passed to DeliciousBrains\WP_Offload_SES\Settings::filter_settings() must be of the type array, bool given, called in /www/MYSITE.com/html/wp-content/plugins/wp-ses/classes/Settings.php on line 83 and defined in /www/MYSITE.com/html/wp-content/plugins/wp-ses/classes/Settings.php:279
The problem seems to be with this code on line 83 of wp-ses/classes/Settings.php:
My site then worked again, although I haven't tested the plugin.
The text was updated successfully, but these errors were encountered:
russellgilbert
changed the title
get_option() returns false in get_settings()
get_option() returns false in get_settings() in version 1.6.0
Feb 19, 2023
russellgilbert
changed the title
get_option() returns false in get_settings() in version 1.6.0
Fatal error: get_option() returns false in get_settings() in version 1.6.0
Feb 19, 2023
After upgrading to version 1.6.0, my site is crashing while displaying any page. Looking at the PHP error log, I see:
The problem seems to be with this code on line 83 of wp-ses/classes/Settings.php:
$this->settings = $this->filter_settings( get_option( $this->settings_key, array() ) );
I believe get_option() is returning false, which is then passed unchecked to filter_settings(), which causes the fatal error.
As a workaround, I modified the line to check for a valid return from get_option(), and force it to be an empty array if it's not:
$this->settings = $this->filter_settings( get_option( $this->settings_key, array() ) ?: array() );
And the same on line 79:
$subsite_settings = get_option( $this->settings_key, array() ) ?: array();
My site then worked again, although I haven't tested the plugin.
The text was updated successfully, but these errors were encountered: