Skip to content

Commit

Permalink
Update esi.class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-hai committed Apr 16, 2019
1 parent 08cd827 commit ce5f209
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions litespeed-cache/inc/esi.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() ) {
Expand Down Expand Up @@ -588,8 +588,9 @@ public static function widget_default_options($options, $widget)
*/
public function sub_widget_block( $instance, WP_Widget $widget, array $args )
{
if ( !is_array( $instance ) ) {
return false ;
// #210407
if ( ! is_array( $instance ) ) {
return $instance ;
}

$name = get_class( $widget ) ;
Expand Down

0 comments on commit ce5f209

Please sign in to comment.