Skip to content

Commit ba4da3b

Browse files
authored
Ensure that ?author=0 resolves to blog user (#996)
1 parent 1a4c6ef commit ba4da3b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

includes/functions.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,7 @@ function url_to_authorid( $url ) {
199199

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

208205
// Check to see if we are using rewrite rules.

0 commit comments

Comments
 (0)