WordPress.org

Make WordPress Core

Ticket #13317: 13317-negative-values-equal-zero.patch

File 13317-negative-values-equal-zero.patch, 385 bytes (added by hakre, 8 years ago)
  • wp-includes/pluggable.php

     
    106106        if ( ! is_numeric( $user_id ) )
    107107                return false;
    108108               
    109         $user_id = absint( $user_id );
     109        $user_id = max( 0, (int) $user_id );
    110110        if ( ! $user_id )
    111111                return false;
    112112