Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/wp-includes/capabilities.php

    • Property svn:mergeinfo set to
      /branches/3.1/wp-includes/capabilities.php18031
      /trunk/wp-includes/capabilities.php18512,​19596,​19638-19641,​19647,​19649,​19653,​19655,​19657,​19662,​19665
    r19325 r19668  
    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.