mirror of
https://github.com/friendica/friendica
synced 2025-04-27 06:30:12 +00:00
Replace deprecated defaults() calls by ?? and ?: operators in src/Module/
This commit is contained in:
parent
8998926e5b
commit
f59ea2af55
40 changed files with 115 additions and 94 deletions
|
@ -28,12 +28,12 @@ class Recovery extends BaseModule
|
|||
return;
|
||||
}
|
||||
|
||||
if (defaults($_POST, 'action', null) == 'recover') {
|
||||
if (($_POST['action'] ?? '') == 'recover') {
|
||||
self::checkFormSecurityTokenRedirectOnError('2fa', 'twofactor_recovery');
|
||||
|
||||
$a = self::getApp();
|
||||
|
||||
$recovery_code = defaults($_POST, 'recovery_code', '');
|
||||
$recovery_code = $_POST['recovery_code'] ?? '';
|
||||
|
||||
if (RecoveryCode::existsForUser(local_user(), $recovery_code)) {
|
||||
RecoveryCode::markUsedForUser(local_user(), $recovery_code);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue