浏览代码

[Form] Implemented fix for 361c67f54f4fee5a6003efdac56d8e0f5ed02c86

Bernhard Schussek 14 年之前
父节点
当前提交
06f829ace5
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Component/Validator/Constraints/TypeValidator.php

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

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