Make WordPress Core


Ignore:
Timestamp:
08/14/2008 05:00:37 PM (18 years ago)
Author:
ryan
Message:

Notice fixes. Props DD32. see #7509

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r8600 r8646  
    491491        if ( false === $q )
    492492                $q = $_GET;
    493         $q['m']   = (int) $q['m'];
    494         $q['cat'] = (int) $q['cat'];
     493        $q['m']   = isset($q['m']) ? (int) $q['m'] : 0;
     494        $q['cat'] = isset($q['cat']) ? (int) $q['cat'] : 0;
    495495        $post_stati  = array(   //      array( adj, noun )
    496496                                'publish' => array(__('Published'), __('Published posts'), __ngettext_noop('Published (%s)', 'Published (%s)')),
     
    511511        }
    512512
    513         if ( 'pending' === $q['post_status'] ) {
     513        if ( isset($q['post_status']) && 'pending' === $q['post_status'] ) {
    514514                $order = 'ASC';
    515515                $orderby = 'modified';
    516         } elseif ( 'draft' === $q['post_status'] ) {
     516        } elseif ( isset($q['post_status']) && 'draft' === $q['post_status'] ) {
    517517                $order = 'DESC';
    518518                $orderby = 'modified';
Note: See TracChangeset for help on using the changeset viewer.