瀏覽代碼

[Validator] The current class isn't set in execution context when doing validateProperty()

meze 13 年之前
父節點
當前提交
03ed770d35
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/Symfony/Component/Validator/GraphWalker.php

+ 1 - 0
src/Symfony/Component/Validator/GraphWalker.php

@@ -129,6 +129,7 @@ class GraphWalker
 
     protected function walkMember(MemberMetadata $metadata, $value, $group, $propertyPath, $propagatedGroup = null)
     {
+        $this->context->setCurrentClass($metadata->getClassName());
         $this->context->setCurrentProperty($metadata->getPropertyName());
 
         foreach ($metadata->findConstraints($group) as $constraint) {