From b76cc4ef92c0b948f7357f29c470703a03b7c451 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Mon, 6 Oct 2008 14:54:00 +0000 Subject: [PATCH] Cleanup to this. Don't need to pass by reference if we're returning too. --- includes/Validate.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/Validate.php b/includes/Validate.php index 7c598cfbda..476df32b93 100644 --- a/includes/Validate.php +++ b/includes/Validate.php @@ -14,7 +14,7 @@ class Validate { * @param int $max The upper limit * @return int */ - public static function int( &$val, $min=0, $max=0x7fffffff ) { + public static function int( $val, $min=0, $max=0x7fffffff ) { $val = intval($val); $val = min($val, $max); $val = max($val, $min); @@ -30,7 +30,7 @@ class Validate { * @param float $max Uppser limit * @return float */ - public static function float( &$val, $min, $max=0x7fffffff ) { + public static function float( $val, $min, $max=0x7fffffff ) { $val = floatval( $val ); $val = min( $val, $max ); $val = max( $val, $min ); @@ -45,7 +45,7 @@ class Validate { * @param int $max Upper limit * @return mixed [int or null] */ - public static function intOrNull( &$val, $min=0, $max=0x7fffffff ) { + public static function intOrNull( $val, $min=0, $max=0x7fffffff ) { $val = trim($val); if($val === '') { return null; -- 2.20.1