diff options
author | Hamid Dehnavi <hamid.dev.pro@gmail.com> | 2023-07-07 13:50:21 +0330 |
---|---|---|
committer | Hamid Dehnavi <hamid.dev.pro@gmail.com> | 2023-09-28 12:18:41 +0330 |
commit | d64bbc8bd3a6a272dd5c550916a6b80222f19e13 (patch) | |
tree | 1b56193c101e936e79478448c41af9b1f87521f5 /apps/user_ldap | |
parent | 456aea80420d7d4fc8dc853d9953687ed3f89ace (diff) | |
download | nextcloud-server-d64bbc8bd3a6a272dd5c550916a6b80222f19e13.tar.gz nextcloud-server-d64bbc8bd3a6a272dd5c550916a6b80222f19e13.zip |
Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/ajax/wizard.php | 4 | ||||
-rw-r--r-- | apps/user_ldap/lib/Access.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/user_ldap/ajax/wizard.php b/apps/user_ldap/ajax/wizard.php index dcfe9ff76b8..8692251c7c0 100644 --- a/apps/user_ldap/ajax/wizard.php +++ b/apps/user_ldap/ajax/wizard.php @@ -105,8 +105,8 @@ switch ($action) { } case 'save': - $key = isset($_POST['cfgkey']) ? $_POST['cfgkey'] : false; - $val = isset($_POST['cfgval']) ? $_POST['cfgval'] : null; + $key = $_POST['cfgkey'] ?? false; + $val = $_POST['cfgval'] ?? null; if ($key === false || is_null($val)) { \OC_JSON::error(['message' => $l->t('No data specified')]); exit; diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 0b115c42764..49e431820ac 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -1746,7 +1746,7 @@ class Access extends LDAPUtility { $uuid = false; if ($this->detectUuidAttribute($dn, $isUser, false, $ldapRecord)) { $attr = $this->connection->$uuidAttr; - $uuid = isset($ldapRecord[$attr]) ? $ldapRecord[$attr] : $this->readAttribute($dn, $attr); + $uuid = $ldapRecord[$attr] ?? $this->readAttribute($dn, $attr); if (!is_array($uuid) && $uuidOverride !== '' && $this->detectUuidAttribute($dn, $isUser, true, $ldapRecord)) { |