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:
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.