WordPress.org

Make WordPress Core

Changeset 4198


Ignore:
Timestamp:
09/19/2006 11:56:28 PM (12 years ago)
Author:
ryan
Message:

Warning and notice fixes from Alex King. fixes #3148

Location:
trunk/wp-includes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/category-template.php

    r4173 r4198  
    220220        'hierarchical' => true, 'title_li' => __('Categories'));
    221221    $r = array_merge($defaults, $r);
    222     $r['include_last_update_time'] = $r['show_date'];
     222    if ( isset($r['show_date']) )
     223        $r['include_last_update_time'] = $r['show_date'];
    223224    extract($r);
    224225
  • trunk/wp-includes/category.php

    r4173 r4198  
    2121
    2222    $defaults = array('type' => 'post', 'child_of' => 0, 'orderby' => 'name', 'order' => 'ASC',
    23         'hide_empty' => true, 'include_last_update_time' => false, 'hierarchical' => 1, $exclude => '', $include => '',
     23        'hide_empty' => true, 'include_last_update_time' => false, 'hierarchical' => 1, 'exclude' => '', 'include' => '',
    2424        'number' => '');
    2525    $r = array_merge($defaults, $r);
  • trunk/wp-includes/classes.php

    r4196 r4198  
    389389            if ( $flat) {
    390390                // Start the element.
    391                 if ( $element->$id_field != 0 ) {
     391                if ( isset($element->$id_field) && $element->$id_field != 0 ) {
    392392                    $cb_args = array_merge( array($output, $element, $depth - 1), $args);
    393393                    $output = call_user_func_array(array(&$this, 'start_el'), $cb_args);
     
    395395   
    396396                // End the element.
    397                 if ( $element->$id_field != 0 ) {
     397                if ( isset($element->$id_field) && $element->$id_field != 0 ) {
    398398                    $cb_args = array_merge( array($output, $element, $depth - 1), $args);
    399399                    $output = call_user_func_array(array(&$this, 'end_el'), $cb_args);
     
    584584        }
    585585   
    586         if ( $show_count )
     586        if ( isset($show_count) && $show_count )
    587587            $link .= ' ('.intval($category->category_count).')';
    588588   
    589         if ( $show_date ) {
     589        if ( isset($show_date) && $show_date ) {
    590590            $link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp);
    591591        }
  • trunk/wp-includes/post.php

    r4191 r4198  
    100100    }
    101101
    102     if ( defined(WP_IMPORTING) )
     102    if ( defined('WP_IMPORTING') )
    103103        unset($post_cache);
    104104
     
    924924        $_page = $page;
    925925    } else {
    926         if ( isset($GLOBALS['page']) && ($page == $GLOBALS['page']->ID) ) {
     926        if ( isset($GLOBALS['page']->ID) && ($page == $GLOBALS['page']->ID) ) {
    927927            $_page = & $GLOBALS['page'];
    928928            wp_cache_add($_page->ID, $_page, 'pages');
    929         } elseif ( $_page = $GLOBALS['post_cache'][$page] ) {
     929        } elseif ( isset($_page) && $_page == $GLOBALS['post_cache'][$page] ) {
    930930            return get_post($page, $output);
    931         } elseif ( $_page = wp_cache_get($page, 'pages') ) {
     931        } elseif ( isset($_page) && $_page == wp_cache_get($page, 'pages') ) {
    932932            // Got it.
    933933        } else {
Note: See TracChangeset for help on using the changeset viewer.