mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
rss_reader 위젯에서 item이 1개일경우 생기는 오류 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4063 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
43e3ac2516
commit
56003fb90a
1 changed files with 4 additions and 2 deletions
|
|
@ -60,11 +60,13 @@
|
|||
$rss->title = $xml_doc->rss->channel->title->body;
|
||||
$rss->link = $xml_doc->rss->channel->link->body;
|
||||
|
||||
if(!is_array($xml_doc->rss->channel->item)) return;
|
||||
$items = $xml_doc->rss->channel->item;
|
||||
if(!$items) return;
|
||||
if($items && !is_array($items)) $items = array($items);
|
||||
|
||||
$rss_list = array();
|
||||
|
||||
foreach ($xml_doc->rss->channel->item as $key => $value) {
|
||||
foreach ($items as $key => $value) {
|
||||
if($key >= $PAGE_LIMIT) break;
|
||||
|
||||
unset($item);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue