diff --git a/litespeed-cache/inc/esi.class.php b/litespeed-cache/inc/esi.class.php index af10ba583..4720c4fd6 100755 --- a/litespeed-cache/inc/esi.class.php +++ b/litespeed-cache/inc/esi.class.php @@ -282,7 +282,7 @@ public function register_not_esi_actions() return ; } - add_filter('widget_display_callback', array($this, 'sub_widget_block'), 0, 3) ; + add_filter('widget_display_callback', array($this, 'sub_widget_block'), 0, 3) ; // Add admin_bar esi if ( LiteSpeed_Cache_Router::is_logged_in() ) { @@ -586,8 +586,13 @@ public static function widget_default_options($options, $widget) * @param array $args Parameter used to build the widget. * @return mixed Return false if display through esi, instance otherwise. */ - public function sub_widget_block( array $instance, WP_Widget $widget, array $args ) + public function sub_widget_block( $instance, WP_Widget $widget, array $args ) { + // #210407 + if ( ! is_array( $instance ) ) { + return $instance ; + } + $name = get_class( $widget ) ; if ( ! isset( $instance[ LiteSpeed_Cache_Config::OPTION_NAME ] ) ) { return $instance ;