diff --git a/phpgwapi/inc/class.validator.inc.php b/phpgwapi/inc/class.validator.inc.php index c8201fc0c5..0a6c1017ed 100644 --- a/phpgwapi/inc/class.validator.inc.php +++ b/phpgwapi/inc/class.validator.inc.php @@ -176,7 +176,7 @@ // Returns true if string contains only numbers function is_allnumbers ($text) { - if( (gettype($text)) == 'integer') + if(is_int($text)) { return true; } @@ -345,7 +345,7 @@ return false; } - if( (gettype($Chars)) != 'array') + if(!is_array($Chars)) { $this->ERROR = "custom_strip: [$Chars] is not an array"; return false; @@ -372,7 +372,7 @@ { if($this->CLEAR) { $this->clear_error(); } - if( (gettype($MyArray)) != 'array') + if(!is_array($MyArray)) { return; } @@ -387,7 +387,7 @@ echo ">$Name Contents:KEYVAL"; } - if( (gettype($val)) == 'array') + if(is_array($val)) { $NewName = "$key [$Name $count]"; $NewArray = $MyArray[$key]; @@ -645,7 +645,7 @@ $chunks = explode(".",$hostname); - if( (gettype($chunks)) != 'array') + if(!is_array($chunks)) { $this->ERROR = "is_hostname: Invalid hostname, no dot seperator [$hostname]"; return false;