Verified Commit 0d0982f8 authored by Jan Pavlíček's avatar Jan Pavlíček
Browse files

fix: array_filter wrong order of parameters

parent 1adbf4b8
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -12,9 +12,9 @@ class ContextSettings
        $password_contexts = $config->getArray('password_contexts', AuthSwitcher::PASSWORD_CONTEXTS);
        $mfa_contexts = $config->getArray('mfa_contexts', AuthSwitcher::MFA_CONTEXTS);
        if ($contexts_regex) {
            $password_contexts_patterns = array_filter(self::isRegex, $password_contexts);
            $password_contexts_patterns = array_filter($password_contexts, self::isRegex);
            $password_contexts = array_diff($password_contexts, $password_contexts_patterns);
            $mfa_contexts_patterns = array_filter(self::isRegex, $mfa_contexts);
            $mfa_contexts_patterns = array_filter($mfa_contexts, self::isRegex);
            $mfa_contexts = array_diff($mfa_contexts, $mfa_contexts_patterns);
        } else {
            $password_contexts_patterns = [];