Skip to content

Commit d456913

Browse files
committed
Revert constructor property promotion; values appear to be readonly unless passed by reference
1 parent 0c9944a commit d456913

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/SimpleSAML/Metadata/SAMLParser.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@ class SAMLParser
141141
*/
142142
private array $registrationInfo;
143143

144+
/**
145+
* This is an array of elements that may be used to validate this element.
146+
*
147+
* @var \SimpleSAML\SAML2\SignedElementHelper[]
148+
*/
149+
private array $validators = [];
150+
144151
/**
145152
* @var \Symfony\Component\Filesystem\Filesystem
146153
*/
@@ -159,7 +166,7 @@ class SAMLParser
159166
private function __construct(
160167
EntityDescriptor $entityElement,
161168
?int $maxExpireTime,
162-
private array $validators = [],
169+
array $validators = [],
163170
array $parentExtensions = []
164171
) {
165172
$this->fileSystem = new Filesystem();
@@ -168,7 +175,8 @@ private function __construct(
168175

169176
$expireTime = self::getExpireTime($entityElement, $maxExpireTime);
170177

171-
$validators[] = $entityElement;
178+
$this->validators = $validators;
179+
$this->validators[] = $entityElement;
172180

173181
// process Extensions element, if it exists
174182
$ext = self::processExtensions($entityElement, $parentExtensions);

0 commit comments

Comments
 (0)