Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
@ -58,12 +58,11 @@ class PropertyMetadata extends MemberMetadata
|
|||
*/
|
||||
protected function newReflectionMember($objectOrClassName)
|
||||
{
|
||||
$class = new \ReflectionClass($objectOrClassName);
|
||||
while (!$class->hasProperty($this->getName())) {
|
||||
$class = $class->getParentClass();
|
||||
while (!property_exists($objectOrClassName, $this->getName())) {
|
||||
$objectOrClassName = get_parent_class($objectOrClassName);
|
||||
}
|
||||
|
||||
$member = new \ReflectionProperty($class->getName(), $this->getName());
|
||||
$member = new \ReflectionProperty($objectOrClassName, $this->getName());
|
||||
$member->setAccessible(true);
|
||||
|
||||
return $member;
|
||||
|
|
Reference in a new issue