reg/select-domain.inc.php: fix operator precedence

This commit is contained in:
Miraty 2023-10-01 19:14:08 +02:00
parent 94fd035010
commit 8624262482

View file

@ -7,6 +7,6 @@ $user_domains = regListUserDomains();
if (!in_array($_POST['domain'] ?? NULL, $user_domains, true))
echo ' <option value="" disabled="" selected="">—</option>' . LF;
foreach ($user_domains as $domain)
echo ' <option value="' . $domain . '"' . (($_POST['domain'] ?? NULL === $domain) ? ' selected=""' : '') . '>' . $domain . '</option>' . LF;
echo ' <option value="' . $domain . '"' . ((($_POST['domain'] ?? NULL) === $domain) ? ' selected=""' : '') . '>' . $domain . '</option>' . LF;
?>
</select>