From 5c927e9ddaf7cecb11efb0666e953e0be94d55b5 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Wed, 19 Jul 2017 10:31:01 +0200 Subject: [PATCH] BUGFIX: Only unset array key if it exists --- Classes/Validation/Validator/SettingsValidator.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Classes/Validation/Validator/SettingsValidator.php b/Classes/Validation/Validator/SettingsValidator.php index 3f1bb0d..af0e009 100644 --- a/Classes/Validation/Validator/SettingsValidator.php +++ b/Classes/Validation/Validator/SettingsValidator.php @@ -178,7 +178,12 @@ class SettingsValidator extends AbstractValidator */ protected function handleValidationGroups(array &$validatorConfig) { - if ($validatorConfig['validator'] !== 'DigiComp.SettingValidator:Settings' || empty($validatorConfig['options']['validationGroups'])) { + if (isset($validatorConfig['options']['validationGroups']) + && ( + $validatorConfig['validator'] !== 'DigiComp.SettingValidator:Settings' + || empty($validatorConfig['options']['validationGroups']) + ) + ) { unset($validatorConfig['options']['validationGroups']); } }