fix PHP 8.0 error setting up two factor auth

key() expects array, null given
This commit is contained in:
Ralf Becker 2021-10-26 19:58:53 +02:00
parent 75b168fb0d
commit e6b08cce70

View File

@ -89,7 +89,7 @@ class preferences_password
break;
case 'two_factor_auth':
switch(key($content['2fa']['action']))
switch(key($content['2fa']['action'] ?? []))
{
case 'show':
$content['2fa'] = $this->generateQRCode($google2fa, false);