diff --git a/lib/Doctrine/Validator.php b/lib/Doctrine/Validator.php index 87f297c29..095860774 100644 --- a/lib/Doctrine/Validator.php +++ b/lib/Doctrine/Validator.php @@ -155,10 +155,18 @@ public static function isValidType($var, $type) { if ($var instanceof Doctrine_Expression) { return true; - } else if ($var === null) { + } + + if ($var === null) { return true; - } else if (is_object($var)) { - return $type == 'object'; + } + + if (is_array($var)) { + return $type === 'array'; + } + + if (is_object($var)) { + return $type === 'object'; } switch ($type) {