Make WordPress Core

Changeset 14447


Ignore:
Timestamp:
05/04/2010 06:41:38 PM (14 years ago)
Author:
wpmuguru
Message:

use reset vs offset 0, props scribu, see #13246

File:
1 edited

Legend:

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

    r14441 r14447  
    25682568    $post_type = get_post_type( $post_ID );
    25692569    // If $post_categories isn't already an array, make it one:
    2570     if ( !is_array($post_categories) || 0 == count($post_categories) || empty($post_categories) ) {
     2570    if ( !is_array($post_categories) || empty($post_categories) ) {
    25712571        if ( 'post' == $post_type )
    25722572            $post_categories = array( get_option('default_category') );
    25732573        else
    25742574            $post_categories = array();
    2575     } else if ( 1 == count($post_categories) && '' == $post_categories[0] ) {
     2575    } else if ( 1 == count($post_categories) && '' == reset($post_categories) ) {
    25762576        return true;
    25772577    }
Note: See TracChangeset for help on using the changeset viewer.