Skip to content

Commit 59e9b8f

Browse files
Merge branch '2.3' into 2.7
* 2.3: [HttpFoundation] Fix transient test [HttpFoundation] Add a dependency on the mbstring polyfill add readme files where missing Don't use reflections when possible [Form] Update form tests after the ICU data update [Intl] Update tests and the number formatter to match behaviour of the intl extension [Intl] Update the ICU data to version 55 [Intl] Fix the update-data.php script in preparation for ICU 5.5 Use constant instead of function call. fixed test name automatically generate safe fallback filename Conflicts: src/Symfony/Component/Debug/Debug.php src/Symfony/Component/HttpFoundation/composer.json src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
2 parents 1caec72 + 9121f4d commit 59e9b8f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Mapping/PropertyMetadata.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,11 @@ public function getPropertyValue($object)
5858
*/
5959
protected function newReflectionMember($objectOrClassName)
6060
{
61-
$class = new \ReflectionClass($objectOrClassName);
62-
while (!$class->hasProperty($this->getName())) {
63-
$class = $class->getParentClass();
61+
while (!property_exists($objectOrClassName, $this->getName())) {
62+
$objectOrClassName = get_parent_class($objectOrClassName);
6463
}
6564

66-
$member = new \ReflectionProperty($class->getName(), $this->getName());
65+
$member = new \ReflectionProperty($objectOrClassName, $this->getName());
6766
$member->setAccessible(true);
6867

6968
return $member;

0 commit comments

Comments
 (0)