diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index ade32740be..7714c72218 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -3000,10 +3000,15 @@ function dead_db() { * @since 2.5.0 * * @param mixed $maybeint Data you wish to have converted to a nonnegative integer + * @param bool $limit Whether to only return up to PHP_INT_MAX. * @return int An nonnegative integer */ -function absint( $maybeint ) { - return min( abs( (int) $maybeint ), PHP_INT_MAX ); +function absint( $maybeint, $limit = false ) { + $int = abs( intval( $maybeint ) ); + if ( $limit && $int > PHP_INT_MAX ) { + $int = PHP_INT_MAX; + } + return $int; } /**