Преглед на файлове

Merge pull request #1306 from luzat/classvalidation-master

Support for class-level validation
Thomas преди 12 години
родител
ревизия
5f47aff854
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      Validator/ErrorElement.php

+ 4 - 0
Validator/ErrorElement.php

@@ -147,6 +147,10 @@ class ErrorElement
      */
     protected function getValue()
     {
+        if ($this->current == '') {
+            return $this->subject;
+        }
+
         $propertyAccessor = PropertyAccess::getPropertyAccessor();
         return $propertyAccessor->getValue($this->subject, $this->getCurrentPropertyPath());
     }