Feature #14674 ยป patch.t3lib_div_intInRange_max.diff
TYPO3core-mod1/t3lib/class.t3lib_div.php 2005-04-15 13:39:50.500617696 +0200 | ||
---|---|---|
* @param integer Default value if input is false.
|
||
* @return integer The input value forced into the boundaries of $min and $max
|
||
*/
|
||
function intInRange($theInt,$min,$max=2000000000,$zeroValue=0) {
|
||
function intInRange($theInt,$min,$max=0x7fffffff,$zeroValue=0) {
|
||
// Returns $theInt as an integer in the integerspace from $min to $max
|
||
$theInt = intval($theInt);
|
||
if ($zeroValue && !$theInt) {$theInt=$zeroValue;} // If the input value is zero after being converted to integer, zeroValue may set another default value for it.
|