Update to Drupal 8.2.6. For more information, see https://www.drupal.org/project/drupal/releases/8.2.6

This commit is contained in:
Pantheon Automation 2017-02-02 16:28:38 -08:00 committed by Greg Anderson
parent db56c09587
commit f1e72395cb
588 changed files with 26857 additions and 2777 deletions

View file

@ -39,7 +39,7 @@ class PropertyMetadata extends MemberMetadata
public function __construct($class, $name)
{
if (!property_exists($class, $name)) {
throw new ValidatorException(sprintf('Property %s does not exist in class %s', $name, $class));
throw new ValidatorException(sprintf('Property "%s" does not exist in class "%s"', $name, $class));
}
parent::__construct($class, $name, $name);
@ -58,8 +58,14 @@ class PropertyMetadata extends MemberMetadata
*/
protected function newReflectionMember($objectOrClassName)
{
$originalClass = is_string($objectOrClassName) ? $objectOrClassName : get_class($objectOrClassName);
while (!property_exists($objectOrClassName, $this->getName())) {
$objectOrClassName = get_parent_class($objectOrClassName);
if (false === $objectOrClassName) {
throw new ValidatorException(sprintf('Property "%s" does not exist in class "%s".', $this->getName(), $originalClass));
}
}
$member = new \ReflectionProperty($objectOrClassName, $this->getName());