Ticket #64507: author_name_string.patch
| File author_name_string.patch, 942 bytes (added by , 2 months ago) |
|---|
-
wp-includes/class-wp-query.php
old new 2418 2418 2419 2419 // Author stuff for nice URLs. 2420 2420 2421 if ( '' !== $query_vars['author_name'] ) {2421 if ( '' !== $query_vars['author_name'] && is_string( $query_vars['author_name'] ) ) { 2422 2422 if ( str_contains( $query_vars['author_name'], '/' ) ) { 2423 2423 $query_vars['author_name'] = explode( '/', $query_vars['author_name'] ); 2424 2424 if ( $query_vars['author_name'][ count( $query_vars['author_name'] ) - 1 ] ) { … … 4039 4039 $this->queried_object_id = (int) $this->post->ID; 4040 4040 } elseif ( $this->is_author ) { 4041 4041 $author = (int) $this->get( 'author' ); 4042 $author_name = $this->get( 'author_name' );4042 $author_name = ( is_string( $this->get( 'author_name' ) ) ) ? $this->get( 'author_name' ) : false; 4043 4043 4044 4044 if ( $author ) { 4045 4045 $this->queried_object_id = $author;