From 874e738fe116764941f3910384a59bc640190c6b Mon Sep 17 00:00:00 2001 From: "Soare Robert Daniel (Mac 2023)" Date: Wed, 24 May 2023 11:59:27 +0300 Subject: [PATCH] fix: widget offset --- inc/class-registration.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/inc/class-registration.php b/inc/class-registration.php index a8520a71b..e33c292d6 100644 --- a/inc/class-registration.php +++ b/inc/class-registration.php @@ -979,8 +979,11 @@ public static function get_active_widgets_content() { $sidebar = is_active_widget( $widget['callback'], $widget['id'] ); if ( $sidebar && 'wp_inactive_widgets' !== $sidebar ) { - $key = $widget['params'][0]['number']; - $valid_widgets[] = (object) $widget_data[ $key ]; + $key = $widget['params'][0]['number']; + + if ( isset( $widget_data[ $key ] ) ) { + $valid_widgets[] = (object) $widget_data[ $key ]; + } } }