mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
Countable or not, in communication view. (#1321)
* 커뮤니케이션 모듈 내용 중 null 이 반환되는 가능성이 있는 부분 예외 상황 대응 https://github.com/rhymix/rhymix/pull/1309 연관
This commit is contained in:
parent
588f7a6df8
commit
83ce4a8099
1 changed files with 12 additions and 4 deletions
|
|
@ -294,13 +294,17 @@ class communicationView extends communication
|
||||||
$oCommunicationModel = getModel('communication');
|
$oCommunicationModel = getModel('communication');
|
||||||
|
|
||||||
// get a group list
|
// get a group list
|
||||||
|
$friend_group_list = array();
|
||||||
$tmp_group_list = $oCommunicationModel->getFriendGroups();
|
$tmp_group_list = $oCommunicationModel->getFriendGroups();
|
||||||
|
if (is_countable($tmp_group_list))
|
||||||
|
{
|
||||||
$group_count = count($tmp_group_list);
|
$group_count = count($tmp_group_list);
|
||||||
|
|
||||||
for($i = 0; $i < $group_count; $i++)
|
for($i = 0; $i < $group_count; $i++)
|
||||||
{
|
{
|
||||||
$friend_group_list[$tmp_group_list[$i]->friend_group_srl] = $tmp_group_list[$i];
|
$friend_group_list[$tmp_group_list[$i]->friend_group_srl] = $tmp_group_list[$i];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Context::set('friend_group_list', $friend_group_list);
|
Context::set('friend_group_list', $friend_group_list);
|
||||||
|
|
||||||
|
|
@ -381,6 +385,10 @@ class communicationView extends communication
|
||||||
|
|
||||||
// get a group list
|
// get a group list
|
||||||
$friend_group_list = $oCommunicationModel->getFriendGroups();
|
$friend_group_list = $oCommunicationModel->getFriendGroups();
|
||||||
|
if(!is_countable($friend_group_list))
|
||||||
|
{
|
||||||
|
$friend_group_list = array();
|
||||||
|
}
|
||||||
Context::set('friend_group_list', $friend_group_list);
|
Context::set('friend_group_list', $friend_group_list);
|
||||||
|
|
||||||
$this->setTemplateFile('add_friend');
|
$this->setTemplateFile('add_friend');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue