라이믹스2.0 알림센터 설정 오류 질문드립니다
CMS/프레임워크 | Rhymix 1.9 |
---|---|
개발 언어 | PHP 7.4 |
PHP 8.0 환경입니다.
어제 기진곰님께서 수정해주신 알림센터 커밋을 반영해서 사용주인데요, 유저가 설정을 변경하려고 할 경우 아래와 같은 메세지가 발생합니다.
그런데 이상한 점은, 위 오류는 어떤 회원은 발생하고 어떤 회원은 정상적으로 작동을 합니다.
제 생각으로는 이번에 알림센터 설정이 푸시알림 등도 설정할 수 있도록 개편이되면서 발생한 것 같은데 혹시 맞을까요?
에러 메세지에서 지적하는 오류 코드 부분은 아래와 같습니다
$user_config = NcenterliteModel::getUserConfig($member_srl);
$notify_types = NcenterliteModel::getNotifyTypes();
foreach ($notify_types as $type => $srl)
{
$user_config->{$type . '_notify'} = $user_config->{$type} ? 'Y' : 'N';
}
Context::set('member_info', $member_info);
Context::set('notify_types', $notify_types);
Context::set('user_config', $user_config);
Context::set('module_config', NcenterliteModel::getConfig());
Context::set('sms_available', Rhymix\Framework\SMS::getDefaultDriver()->getName() !== 'Dummy');
Context::set('push_available', count(Rhymix\Framework\Config::get('push.types')) > 0);
$this->setTemplateFile('userconfig');
}
$notify_types = NcenterliteModel::getNotifyTypes();
foreach ($notify_types as $type => $srl)
{
$user_config->{$type . '_notify'} = $user_config->{$type} ? 'Y' : 'N';
}
Context::set('member_info', $member_info);
Context::set('notify_types', $notify_types);
Context::set('user_config', $user_config);
Context::set('module_config', NcenterliteModel::getConfig());
Context::set('sms_available', Rhymix\Framework\SMS::getDefaultDriver()->getName() !== 'Dummy');
Context::set('push_available', count(Rhymix\Framework\Config::get('push.types')) > 0);
$this->setTemplateFile('userconfig');
}
댓글 5
추가 패치입니다.
https://github.com/rhymix/rhymix/commit/17a69cf6
알림센터의 기능 및 설정 가능한 항목들이 몇 년간 조금씩 조금씩 늘어나 온 터라
다양한 경우의 수를 모두 커버하기가 쉽지 않군요.
서버 오류
TypeError #0 "count(): Argument #1 ($var) must be of type Countable|array, null given" in modules/ncenterlite/ncenterlite.view.php on line 80
common/framework/debug.php:681
감사합니다!