WordPress.org

Make WordPress Core

Changeset 13680


Ignore:
Timestamp:
03/12/10 00:03:44 (4 years ago)
Author:
nacin
Message:

Fix notice on users admin panel. More or less reverts earlier fix, [13617]. props miqrogroove. fixes #12555

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/users.php

    r13617 r13680  
    371371 
    372372    $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"'; 
    373     echo "\n\t", user_row($user_object, $style, $role, isset( $post_counts[ $userid ] ) ? $post_counts[ $userid ] : 0 ); 
     373    echo "\n\t", user_row( $user_object, $style, $role, $post_counts[ $userid ] ); 
    374374} 
    375375?> 
  • trunk/wp-includes/user.php

    r13667 r13680  
    170170 
    171171    $count = array(); 
    172     if ( ! count( $users ) ) 
     172    if ( ! is_array($users) || empty( $users ) ) 
    173173        return $count; 
    174174 
     
    177177 
    178178    $result = $wpdb->get_results( "SELECT post_author, COUNT(*) FROM $wpdb->posts $where AND post_author IN ($userlist) GROUP BY post_author", ARRAY_N ); 
    179  
    180     if ( ! $result ) 
    181         return $count; 
    182  
    183179    foreach ( $result as $row ) { 
    184180        $count[ $row[0] ] = $row[1]; 
Note: See TracChangeset for help on using the changeset viewer.