Fix some of the notices visible with WP_DEBUG enabled.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
21d9604409
commit
1f889417e5
|
@ -4,12 +4,15 @@ function _walk_bookmarks($bookmarks, $args = '' ) {
|
|||
$defaults = array(
|
||||
'show_updated' => 0, 'show_description' => 0,
|
||||
'show_images' => 1, 'before' => '<li>',
|
||||
'after' => '</li>', 'between' => "\n"
|
||||
'after' => '</li>', '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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 .= "\t<li";
|
||||
$class = 'cat-item cat-item-'.$category->term_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";
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue