From 0911bab41f33c97b27c376b7d3c89bd99bbfa3ca Mon Sep 17 00:00:00 2001
From: SeBsZ <sebs89@gmail.com>
Date: Wed, 30 Aug 2017 09:52:07 +0200
Subject: [PATCH] Fixes #41743 by checking if the specified widget has been
registered first before trying to access an undefined index
---
src/wp-includes/widgets.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/wp-includes/widgets.php b/src/wp-includes/widgets.php
index fbbdcf5..11ed07d 100644
a
|
b
|
function wp_convert_widget_settings($base_name, $option_name, $settings) { |
1036 | 1036 | function the_widget( $widget, $instance = array(), $args = array() ) { |
1037 | 1037 | global $wp_widget_factory; |
1038 | 1038 | |
| 1039 | if ( ! ( isset($wp_widget_factory->widgets[$widget]) ) ) { |
| 1040 | return; |
| 1041 | } |
| 1042 | |
1039 | 1043 | $widget_obj = $wp_widget_factory->widgets[$widget]; |
1040 | 1044 | if ( ! ( $widget_obj instanceof WP_Widget ) ) { |
1041 | 1045 | return; |