Make WordPress Core

Ticket #39428: 39428.2.diff

File 39428.2.diff, 499 bytes (added by SirLouen, 14 months ago)
  • src/wp-includes/class-wp-query.php

    diff --git src/wp-includes/class-wp-query.php src/wp-includes/class-wp-query.php
    index 21127dc755..734ab78a21 100644
    class WP_Query {  
    24312431                        $q['author']      = get_user_by( 'slug', $q['author_name'] );
    24322432                        if ( $q['author'] ) {
    24332433                                $q['author'] = $q['author']->ID;
     2434                        } else {
     2435                                return array();
    24342436                        }
    24352437                        $whichauthor .= " AND ({$wpdb->posts}.post_author = " . absint( $q['author'] ) . ')';
    24362438                }