Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PHP warning for empty security module settings
Since PR #374 I've noticed a PHP warning in the logs: ``` PHP Warning: Trying to access array offset on value of type bool in /usr/src/app/packages/security/inc/namespace.php on line 139 ``` This is because the `required` key in the `override_two_factor_forced_user_roles` function is not always an array or even present. For example, if your relevant section of `composer.json` looks like this: ``` json { "extra": { "altis": { "modules: { "security": {} } } } } ``` you get the warning. This PR adds a check to ensure that the key is an array before trying to access it.
- Loading branch information