mirror of
https://github.com/WordPress/WordPress.git
synced 2024-06-29 16:25:03 +02:00
In WP_User::get_data_by(), don't abs int negative IDs. Instead, return false when an ID less than 1 is passed.
Props nacin, mordauk fixes #23480 git-svn-id: http://core.svn.wordpress.org/trunk@24316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6ad78a3d4d
commit
982694749b
|
@ -535,7 +535,9 @@ class WP_User {
|
||||||
// to int 1.
|
// to int 1.
|
||||||
if ( ! is_numeric( $value ) )
|
if ( ! is_numeric( $value ) )
|
||||||
return false;
|
return false;
|
||||||
$value = absint( $value );
|
$value = intval( $value );
|
||||||
|
if ( $value < 1 )
|
||||||
|
return false;
|
||||||
} else {
|
} else {
|
||||||
$value = trim( $value );
|
$value = trim( $value );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user