Skip to content

Commit d27c479

Browse files
TDannhauerralflang
authored andcommitted
Use null coalescing operator in currentProcessAuth
Before: currentProcessAuth() did $this->_args['authentication'] !== 'none', which assumes the key exists. After: ($this->_args['authentication'] ?? null) !== 'none'. Why: During logout, concurrent AJAX, or requests where _args was not fully set, PHP logged Undefined array key "authentication". This is a small hardening change; it does not change normal behavior when authentication is 'none', null, or unset (all treated as “auth not required for this process”). It mainly stops noise when apps call registry methods during/after session teardown.
1 parent efb5978 commit d27c479

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/Horde/Registry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2330,7 +2330,7 @@ public function isAuthenticated(array $opts = [])
23302330
*/
23312331
public function currentProcessAuth()
23322332
{
2333-
return ($this->_args['authentication'] !== 'none');
2333+
return (($this->_args['authentication'] ?? null) !== 'none');
23342334
}
23352335

23362336
/**

0 commit comments

Comments
 (0)