8000 bugfix php jit issue with ternary operator · symfony/symfony@96008d6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 96008d6

Browse files
bugfix php jit issue with ternary operator
see #54053 for more context
1 parent 509aa06 commit 96008d6

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/Symfony/Component/VarExporter/Internal/Hydrator.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,19 @@ public static function getPropertyScopes($class)
271271
$name = $property->name;
272272

273273
if (\ReflectionProperty::IS_PRIVATE & $flags) {
274-
$propertyScopes["\0$class\0$name"] = $propertyScopes[$name] = [$class, $name, $flags & \ReflectionProperty::IS_READONLY ? $class : null, $property];
274+
$readonlyScope = null;
275+
if ($flags & \ReflectionProperty::IS_READONLY) {
276+
$readonlyScope = $class;
277+
}
278+
279+
$propertyScopes["\0$class\0$name"] = $propertyScopes[$name] = [$class, $name, $readonlyScope, $property];
275280
continue;
276281
}
277-
$propertyScopes[$name] = [$class, $name, $flags & \ReflectionProperty::IS_READONLY ? $property->class : null, $property];
282+
$readonlyScope = null;
283+
if ($flags & \ReflectionProperty::IS_READONLY) {
284+
$readonlyScope = $property->class;
285+
}
286+
$propertyScopes[$name] = [$class, $name, $readonlyScope, $property];
278287

279288
if (\ReflectionProperty::IS_PROTECTED & $flags) {
280289
$propertyScopes["\0*\0$name"] = $propertyScopes[$name];

0 commit comments

Comments
 (0)
0