Skip to content

Commit

Permalink
Ensure that ?author=0 resolves to blog user (#996)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwiebe authored Nov 15, 2024
1 parent 1a4c6ef commit ba4da3b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,7 @@ function url_to_authorid( $url ) {

// First, check to see if there is a 'author=N' to match against.
if ( \preg_match( '/[?&]author=(\d+)/i', $url, $values ) ) {
$id = \absint( $values[1] );
if ( $id ) {
return $id;
}
return \absint( $values[1] );
}

// Check to see if we are using rewrite rules.
Expand Down

0 comments on commit ba4da3b

Please sign in to comment.