Fix error in PHP 8.0

https://xetown.com/questions/1523166
This commit is contained in:
Kijin Sung 2021-02-04 22:33:25 +09:00
parent aba959f673
commit 0d43210c94

View file

@ -78,7 +78,7 @@ class ncenterliteView extends ncenterlite
foreach (['web', 'mail', 'sms', 'push'] as $item)
{
$available = isset($config->use[$notify_type][$item]) && $config->use[$notify_type][$item] !== 'N';
$selected = !is_array($user_config->{$notify_type} ?? []) || in_array($item, $user_config->{$notify_type});
$selected = !is_array($user_config->{$notify_type} ?? null) || in_array($item, $user_config->{$notify_type});
$user_selected[$notify_type][$item] = new stdClass();
$user_selected[$notify_type][$item]->available = $available;
$user_selected[$notify_type][$item]->selected = $selected;