From ff8e9774ae266e7a2d76b0df08f34a33f0c73b72 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 26 Jun 2014 18:34:15 +0000 Subject: [PATCH] Revert [28856] at nacin's behest. See #23383. Built from https://develop.svn.wordpress.org/trunk@28857 git-svn-id: http://core.svn.wordpress.org/trunk@28660 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index ade32740be..7714c72218 100644 --- a/wp-includes/functions.php +++ b/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; } /**