simplepie: check whether enclosures array is defined before parsing

master
Andrew Dolgov 17 years ago
parent cfa43e025c
commit 3b9e5af4b9

@ -859,7 +859,7 @@
$additional_tags = array(); $additional_tags = array();
$additional_tags_src = $item->get_categories(); $additional_tags_src = $item->get_categories();
if (is_array($additional_tags_src)) { if (is_array($additional_tags_src)) {
foreach ($additional_tags_src as $tobj) { foreach ($additional_tags_src as $tobj) {
array_push($additional_tags, $tobj->get_term()); array_push($additional_tags, $tobj->get_term());
@ -919,11 +919,13 @@
if (ENABLE_SIMPLEPIE) { if (ENABLE_SIMPLEPIE) {
$encs = $item->get_enclosures(); $encs = $item->get_enclosures();
foreach ($encs as $e) { if (is_array($encs)) {
$e_item = array( foreach ($encs as $e) {
$e->link, $e->type, $e->length); $e_item = array(
$e->link, $e->type, $e->length);
array_push($enclosures, $e_item);
array_push($enclosures, $e_item);
}
} }
} else { } else {

Loading…
Cancel
Save