Make WordPress Core


Ignore:
Timestamp:
11/02/2011 05:06:34 PM (12 years ago)
Author:
duck_
Message:

Return full WHERE clause from get_posts_by_author_sql() if the post type isn't registerd. Fixes SQL sytax on users list when 'post' is unregistered. Fixes #19116.

File:
1 edited

Legend:

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

    r19094 r19117  
    41514151    $post_type_obj = get_post_type_object( $post_type );
    41524152    if ( ! $post_type_obj )
    4153         return ' 1 = 0 ';
     4153        return $full ? 'WHERE 1 = 0' : ' 1 = 0 ';
    41544154
    41554155    // This hook is deprecated. Why you'd want to use it, I dunno.
Note: See TracChangeset for help on using the changeset viewer.