#17967455 플래닛 위젯에 글이 없을 경우 php 오류 생기지 않도록 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6219 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-04-28 06:48:09 +00:00
parent a134cfc1bb
commit d6c575ded6

View file

@ -34,12 +34,16 @@
$oPlanetModel = &getModel('planet');
Context::set('planet', $planet = $oPlanetModel->getPlanet());
foreach($output->data as $key => $val) {
$document_srl = $val->document_srl;
$oPlanet = null;
$oPlanet = new PlanetItem();
$oPlanet->setAttribute($val);
$planet_list[] = $oPlanet;
if(count($output->data)) {
foreach($output->data as $key => $val) {
$document_srl = $val->document_srl;
$oPlanet = null;
$oPlanet = new PlanetItem();
$oPlanet->setAttribute($val);
$planet_list[] = $oPlanet;
}
} else {
$planet_list = array();
}
Context::set('planet_list', $planet_list);