simplepie: check whether enclosures array is defined before parsing
This commit is contained in:
parent
cfa43e025c
commit
3b9e5af4b9
|
@ -919,12 +919,14 @@
|
||||||
if (ENABLE_SIMPLEPIE) {
|
if (ENABLE_SIMPLEPIE) {
|
||||||
$encs = $item->get_enclosures();
|
$encs = $item->get_enclosures();
|
||||||
|
|
||||||
|
if (is_array($encs)) {
|
||||||
foreach ($encs as $e) {
|
foreach ($encs as $e) {
|
||||||
$e_item = array(
|
$e_item = array(
|
||||||
$e->link, $e->type, $e->length);
|
$e->link, $e->type, $e->length);
|
||||||
|
|
||||||
array_push($enclosures, $e_item);
|
array_push($enclosures, $e_item);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$e_ctr = $item['enclosure#'];
|
$e_ctr = $item['enclosure#'];
|
||||||
|
|
Loading…
Reference in New Issue