WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/14/2011 05:36:38 PM (9 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

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

    r19593 r19596  
    488488        global $wpdb;
    489489
    490         if ( 'id' == $field )
     490        if ( 'id' == $field ) {
     491            // Make sure the value is numeric to avoid casting objects, for example,
     492            // to int 1.
     493            if ( ! is_numeric( $value ) )
     494                return false;
    491495            $value = absint( $value );
    492         else
     496        } else {
    493497            $value = trim( $value );
     498        }
    494499
    495500        if ( !$value )
Note: See TracChangeset for help on using the changeset viewer.