File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1204,9 +1204,14 @@ public function getEndpoints(string $endpointType): array
12041204 return [];
12051205 }
12061206
1207-
12081207 $ eps = $ this ->configuration [$ endpointType ];
1209- Assert::isArray ($ eps , Error \CriticalConfigurationError::class);
1208+ if (!is_array ($ eps )) {
1209+ $ filename = explode ('/ ' , $ loc )[0 ];
1210+ throw new Error \CriticalConfigurationError (
1211+ "Endpoint of type $ endpointType is not an array in $ loc. " ,
1212+ $ filename ,
1213+ );
1214+ }
12101215
12111216 $ eps_count = count ($ eps );
12121217
Original file line number Diff line number Diff line change @@ -974,7 +974,8 @@ public function testGetEndpoints(): void
974974
975975 // define a set of exception messages to expect
976976 $ msgs = [
977- 'The configuration is invalid: Expected an array. Got: integer ' ,
977+ "The configuration ([ARRAY]['SingleSignOnService']:) is invalid: Endpoint of type " .
978+ "SingleSignOnService is not an array in [ARRAY]['SingleSignOnService']:. " ,
978979 'Expected a string or an array. ' ,
979980 'Missing Location. ' ,
980981 'Location must be a string. ' ,
You can’t perform that action at this time.
0 commit comments