Remove extraneous spaces. Props kenan3008, dimadin. fixes #19501 #19433

git-svn-id: https://develop.svn.wordpress.org/trunk@19596 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2011-12-14 17:36:38 +00:00
parent 63462aca3a
commit 54067a5f20
32 changed files with 73 additions and 68 deletions

View File

@ -487,10 +487,15 @@ class WP_User {
static function get_data_by( $field, $value ) {
global $wpdb;
if ( 'id' == $field )
if ( 'id' == $field ) {
// Make sure the value is numeric to avoid casting objects, for example,
// to int 1.
if ( ! is_numeric( $value ) )
return false;
$value = absint( $value );
else
} else {
$value = trim( $value );
}
if ( !$value )
return false;