mirror of
https://github.com/friendica/friendica
synced 2025-04-25 20:30:11 +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
|
@ -26,12 +26,12 @@ class Index extends BaseSettingsModule
|
|||
self::checkFormSecurityTokenRedirectOnError('settings/2fa', 'settings_2fa');
|
||||
|
||||
try {
|
||||
User::getIdFromPasswordAuthentication(local_user(), defaults($_POST, 'password', ''));
|
||||
User::getIdFromPasswordAuthentication(local_user(), $_POST['password'] ?? '');
|
||||
|
||||
$has_secret = (bool) PConfig::get(local_user(), '2fa', 'secret');
|
||||
$verified = PConfig::get(local_user(), '2fa', 'verified');
|
||||
|
||||
switch (defaults($_POST, 'action', '')) {
|
||||
switch ($_POST['action'] ?? '') {
|
||||
case 'enable':
|
||||
if (!$has_secret && !$verified) {
|
||||
$Google2FA = new Google2FA();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue