We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1d2f999 + 45fcdf1 commit 6447803Copy full SHA for 6447803
1 file changed
lib/SAMLSettings.php
@@ -197,11 +197,9 @@ public function get(int $id): array {
197
* @throws InvalidArgumentException
198
*/
199
public function set(int $id, array $settings): void {
200
- foreach (array_keys($settings) as $configKey) {
201
- if (!in_array($configKey, self::IDP_CONFIG_KEYS)) {
202
- throw new InvalidArgumentException('Invalid config key');
203
- }
204
+ $settings = array_filter($settings, static function (string $configKey): bool {
+ return in_array($configKey, self::IDP_CONFIG_KEYS, true);
+ }, ARRAY_FILTER_USE_KEY);
205
206
$this->mapper->set($id, $settings);
207
}
0 commit comments