diff --git a/wp-includes/bookmark-template.php b/wp-includes/bookmark-template.php index 68a2842cf..70e495ce0 100644 --- a/wp-includes/bookmark-template.php +++ b/wp-includes/bookmark-template.php @@ -4,12 +4,15 @@ function _walk_bookmarks($bookmarks, $args = '' ) { $defaults = array( 'show_updated' => 0, 'show_description' => 0, 'show_images' => 1, 'before' => '
  • ', - 'after' => '
  • ', 'between' => "\n" + 'after' => '', 'between' => "\n", + 'show_rating' => 0 ); $r = wp_parse_args( $args, $defaults ); extract( $r, EXTR_SKIP ); + $output = ''; // Blank string to start with. + foreach ( (array) $bookmarks as $bookmark ) { if ( !isset($bookmark->recently_updated) ) $bookmark->recently_updated = false; diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php index 1d95b22ad..063d8b546 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -20,7 +20,7 @@ function redirect_canonical($requested_url=NULL, $do_redirect=true) { // Some PHP setups turn requests for / into /index.php in REQUEST_URI $original['path'] = preg_replace('|/index\.php$|', '/', $original['path']); - + $redirect = $original; $redirect_url = false; diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 4002930d0..b5ba180ca 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -527,6 +527,9 @@ class Walker_Page extends Walker { function start_el($output, $page, $depth, $current_page, $args) { if ( $depth ) $indent = str_repeat("\t", $depth); + else + $indent = ''; + extract($args, EXTR_SKIP); $css_class = 'page_item page-item-'.$page->ID; $_current_page = get_page( $current_page ); @@ -646,15 +649,15 @@ class Walker_Category extends Walker { $link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp); } - if ( $current_category ) + if ( isset($current_category) && $current_category ) $_current_category = get_category( $current_category ); if ( 'list' == $args['style'] ) { $output .= "\tterm_id; - if ( $current_category && ($category->term_id == $current_category) ) + if ( isset($current_category) && $current_category && ($category->term_id == $current_category) ) $class .= ' current-cat'; - elseif ( $_current_category && ($category->term_id == $_current_category->parent) ) + elseif ( isset($_current_category) && $_current_category && ($category->term_id == $_current_category->parent) ) $class .= ' current-cat-parent'; $output .= ' class="'.$class.'"'; $output .= ">$link\n"; diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index a6a5aa068..124af8176 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -203,7 +203,7 @@ function dynamic_sidebar($index = 1) { $sidebars_widgets = wp_get_sidebars_widgets(); - if ( empty($wp_registered_sidebars[$index]) || !is_array($sidebars_widgets[$index]) || empty($sidebars_widgets[$index]) ) + if ( empty($wp_registered_sidebars[$index]) || !array_key_exists($index, $sidebars_widgets) || !is_array($sidebars_widgets[$index]) || empty($sidebars_widgets[$index]) ) return false; $sidebar = $wp_registered_sidebars[$index];