We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 815e0fc commit 407fb5cCopy full SHA for 407fb5c
packages/reflection/src/PropertyReflector.php
@@ -151,7 +151,9 @@ public function hasDefaultValue(): bool
151
152
$hasDefaultValue = $this->reflectionProperty->hasDefaultValue();
153
154
- $hasPromotedDefaultValue = $this->isPromoted() && $constructorParameters[$this->getName()]->isDefaultValueAvailable();
+ $hasPromotedDefaultValue = $this->isPromoted()
155
+ && isset($constructorParameters[$this->getName()])
156
+ && $constructorParameters[$this->getName()]->isDefaultValueAvailable();
157
158
return $hasDefaultValue || $hasPromotedDefaultValue;
159
}
0 commit comments