WordPress.org

Make WordPress Core

Ticket #41743: 41743.3.diff

File 41743.3.diff, 1.0 KB (added by mrasharirfan, 2 years ago)
  • wp-includes/widgets.php

     
    10361036function the_widget( $widget, $instance = array(), $args = array() ) {
    10371037        global $wp_widget_factory;
    10381038
     1039        if ( ! isset( $wp_widget_factory->widgets[ $widget ] ) ) {
     1040                return;
     1041        }
     1042
    10391043        $widget_obj = $wp_widget_factory->widgets[$widget];
    10401044        if ( ! ( $widget_obj instanceof WP_Widget ) ) {
    10411045                return;
  • wp-includes/widgets.php

     
    10361036function the_widget( $widget, $instance = array(), $args = array() ) {
    10371037        global $wp_widget_factory;
    10381038
    1039         $widget_obj = $wp_widget_factory->widgets[$widget];
     1039        if ( ! isset( $wp_widget_factory->widgets[ $widget ] ) ) {
     1040                return;
     1041        }
     1042
     1043        $widget_obj = $wp_widget_factory->widgets[ $widget ];
    10401044        if ( ! ( $widget_obj instanceof WP_Widget ) ) {
    10411045                return;
    10421046        }