diff --git a/lib/Doctrine/Validator.php b/lib/Doctrine/Validator.php index bab8fe82c..75e63dbbb 100644 --- a/lib/Doctrine/Validator.php +++ b/lib/Doctrine/Validator.php @@ -89,7 +89,7 @@ public function validateRecord(Doctrine_Record $record) */ public static function validateLength($value, $type, $maximumLength) { - if ($maximumLength === null ) { + if ($maximumLength === null || $value === null) { return true; } if ($type == 'timestamp' || $type == 'integer' || $type == 'enum') {