]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/widgets.php
Wordpress 3.2
[autoinstalls/wordpress.git] / wp-includes / widgets.php
index 4c6d4f44898d41571ce6f9e62e90d1e4b8bf394a..b90ffd6753d69f0309e05f94909d9b45bc97d62f 100644 (file)
@@ -74,7 +74,7 @@ class WP_Widget {
         * PHP4 constructor
         */
        function WP_Widget( $id_base = false, $name, $widget_options = array(), $control_options = array() ) {
-               $this->__construct( $id_base, $name, $widget_options, $control_options );
+               WP_Widget::__construct( $id_base, $name, $widget_options, $control_options );
        }
 
        /**
@@ -854,6 +854,8 @@ function dynamic_sidebar($index = 1) {
        }
 
        $sidebars_widgets = wp_get_sidebars_widgets();
+       if ( empty( $sidebars_widgets ) )
+               return false;
 
        if ( empty($wp_registered_sidebars[$index]) || !array_key_exists($index, $sidebars_widgets) || !is_array($sidebars_widgets[$index]) || empty($sidebars_widgets[$index]) )
                return false;
@@ -897,7 +899,7 @@ function dynamic_sidebar($index = 1) {
 }
 
 /**
- * Whether widget is displayied on the front-end.
+ * Whether widget is displayed on the front-end.
  *
  * Either $callback or $id_base can be used
  * $id_base is the first argument when extending WP_Widget class