Boolean type checking fixed
This commit is contained in:
parent
3a7f9b0e92
commit
46965043be
@ -227,9 +227,12 @@ class Doctrine_Validator {
|
|||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public static function isValidType($var, $type) {
|
public static function isValidType($var, $type) {
|
||||||
|
if($type == 'boolean')
|
||||||
|
return true;
|
||||||
|
|
||||||
$looseType = self::gettype($var);
|
$looseType = self::gettype($var);
|
||||||
if($type == 'enum')
|
if($type == 'enum')
|
||||||
$type = 'integer';
|
$type = 'integer';
|
||||||
|
|
||||||
switch($looseType):
|
switch($looseType):
|
||||||
case 'float':
|
case 'float':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user