浏览代码

2.1 BC fix for addViolation() method

mewlabs 13 年之前
父节点
当前提交
46d08cef98
共有 1 个文件被更改,包括 1 次插入7 次删除
  1. 1 7
      Validator/ErrorElement.php

+ 1 - 7
Validator/ErrorElement.php

@@ -199,13 +199,7 @@ class ErrorElement
             $message    = isset($message[0]) ? $message[0] : 'error';
         }
 
-        if (method_exists($this->context, 'setPropertyPath')) {
-            $this->context->setPropertyPath($this->getFullPropertyPath());
-            $this->context->setGroup($this->group);
-            $this->context->addViolation($message, $parameters, $value);
-        } else {
-            $this->context->addViolationAtPath($this->getFullPropertyPath(), $message, $parameters, $value);
-        }
+        $this->context->addViolationAtPath($this->getFullPropertyPath(), $message, $parameters, $value);
 
         $this->errors[] = array($message, $parameters, $value);