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
This commit is contained in:
Scott Taylor 2014-06-26 18:34:15 +00:00
parent cd93bc05e5
commit ff8e9774ae

View File

@ -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;
}
/**