浏览代码

[Validator] fixed a unit test for PHP 5.4 (closes #2585)

Fabien Potencier 13 年之前
父节点
当前提交
fb0fffe6db
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Component/Validator/Constraints/TypeValidator.php

+ 1 - 1
src/Symfony/Component/Validator/Constraints/TypeValidator.php

@@ -45,7 +45,7 @@ class TypeValidator extends ConstraintValidator
         }
 
         $this->setMessage($constraint->message, array(
-            '{{ value }}' => is_object($value) ? get_class($value) : (string)$value,
+            '{{ value }}' => is_object($value) ? get_class($value) : is_array($value) ? 'Array' : (string) $value,
             '{{ type }}'  => $constraint->type,
         ));