File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -819,7 +819,9 @@ function __construct() {
819819 add_action ( 'admin_notices ' , array ( $ this , 'wp_action_admin_notices_warn_missing_redis ' ) );
820820 }
821821
822- if ( $ this ->is_redis_failback_flush_enabled () ) {
822+ // $wpdb->options can be unset before multisite loads
823+ // It's safe to skip here if unset, because cache will be reinitialized when `$blog_id` is available
824+ if ( $ this ->is_redis_failback_flush_enabled () && ! empty ( $ wpdb ->options ) ) {
823825 $ this ->do_redis_failback_flush = (bool ) $ wpdb ->get_results ( "SELECT option_value FROM {$ wpdb ->options } WHERE option_name='wp_redis_do_redis_failback_flush' " );
824826 if ( $ this ->is_redis_connected && $ this ->do_redis_failback_flush ) {
825827 $ ret = $ this ->_call_redis ( 'flushAll ' );
You can’t perform that action at this time.
0 commit comments