From d40b6eab66be0e554582f3ae19b96c268cbabaf9 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 21 Aug 2015 18:08:53 +0000 Subject: [PATCH] Widgets: Switch back to using `array_key_exists()` instead of `isset()` for widget instance existence check. Reverts unnecessary change in [32602] since `array_key_exists()` does actually work with `ArrayIterator` objects. See #32474. Fixes #33442. git-svn-id: https://develop.svn.wordpress.org/trunk@33696 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/widgets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/widgets.php b/src/wp-includes/widgets.php index 40de6c84a1..28daba1a62 100644 --- a/src/wp-includes/widgets.php +++ b/src/wp-includes/widgets.php @@ -316,7 +316,7 @@ class WP_Widget { $this->_set( $widget_args['number'] ); $instances = $this->get_settings(); - if ( isset( $instances[ $this->number ] ) ) { + if ( array_key_exists( $this->number, $instances ) ) { $instance = $instances[ $this->number ]; /**