Make WordPress Core

Ticket #2384: if_authors_is_array_test.patch

File if_authors_is_array_test.patch, 608 bytes (added by MichaelH, 18 years ago)

fix for template-functions-author.php

  • wp-includes/template-functions-author.php

     
    178178        global $wpdb;
    179179        $query = "SELECT ID, user_nicename from $wpdb->users " . ($exclude_admin ? "WHERE user_login <> 'admin' " : '') . "ORDER BY display_name";
    180180        $authors = $wpdb->get_results($query);
     181   
     182    if ( !is_array($authors) ) 
     183                return false;
    181184
    182185        foreach ( $authors as $author ) {
    183186                $author = get_userdata( $author->ID );