Introducing absint() for casting to an absolute integer. see #4762
git-svn-id: http://svn.automattic.com/wordpress/trunk@6222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c5f9186919
commit
c23352bedf
|
@ -1432,4 +1432,13 @@ function require_wp_db()
|
||||||
require_once (ABSPATH . WPINC . '/wp-db.php');
|
require_once (ABSPATH . WPINC . '/wp-db.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts input to an absolute integer
|
||||||
|
* @param mixed $maybeint data you wish to have convered to an absolute integer
|
||||||
|
* @return int an absolute integer
|
||||||
|
*/
|
||||||
|
function absint($maybeint) {
|
||||||
|
return abs(intval($maybeint));
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue