فهرست منبع

[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) {