Ticket #23383: 23383.diff
File 23383.diff, 689 bytes (added by , 10 years ago) |
---|
-
src/wp-includes/functions.php
2994 2994 * @since 2.5.0 2995 2995 * 2996 2996 * @param mixed $maybeint Data you wish to have converted to a nonnegative integer 2997 * @param bool $limit Whether to only return up to PHP_MAX_INT. 2997 2998 * @return int An nonnegative integer 2998 2999 */ 2999 function absint( $maybeint ) { 3000 return abs( intval( $maybeint ) ); 3000 function absint( $maybeint, $limit = false ) { 3001 $int = abs( intval( $maybeint ) ); 3002 if ( $limit && $int > PHP_INT_MAX ) { 3003 $int = PHP_INT_MAX; 3004 } 3005 return $int; 3001 3006 } 3002 3007 3003 3008 /**