WordPress.org

Make WordPress Core

Changeset 24316


Ignore:
Timestamp:
05/22/2013 06:14:37 PM (5 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r23358 r24316  
    536536            if ( ! is_numeric( $value ) )
    537537                return false;
    538             $value = absint( $value );
     538            $value = intval( $value );
     539            if ( $value < 1 )
     540                return false;
    539541        } else {
    540542            $value = trim( $value );
Note: See TracChangeset for help on using the changeset viewer.