BUGFIX: Only unset array key if it exists
This commit is contained in:
parent
3da68c2e49
commit
5c927e9dda
1 changed files with 6 additions and 1 deletions
|
@ -178,7 +178,12 @@ class SettingsValidator extends AbstractValidator
|
||||||
*/
|
*/
|
||||||
protected function handleValidationGroups(array &$validatorConfig)
|
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']);
|
unset($validatorConfig['options']['validationGroups']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue