summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-01-17 06:45:55 +0100
committerAndrew Dolgov <[email protected]>2008-01-17 06:45:55 +0100
commit3b9e5af4b93279926c27a1c9c19b223b93ba0cea (patch)
tree9e391bf45eddccc53bd5c9b5fe7021e02ea14333
parentcfa43e025cf4246d815a5f1539cd34b461130a9a (diff)
simplepie: check whether enclosures array is defined before parsing
-rw-r--r--functions.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/functions.php b/functions.php
index b445ab675..a5da7b0bb 100644
--- a/functions.php
+++ b/functions.php
@@ -859,7 +859,7 @@
$additional_tags = array();
$additional_tags_src = $item->get_categories();
-
+
if (is_array($additional_tags_src)) {
foreach ($additional_tags_src as $tobj) {
array_push($additional_tags, $tobj->get_term());
@@ -919,11 +919,13 @@
if (ENABLE_SIMPLEPIE) {
$encs = $item->get_enclosures();
- foreach ($encs as $e) {
- $e_item = array(
- $e->link, $e->type, $e->length);
-
- array_push($enclosures, $e_item);
+ if (is_array($encs)) {
+ foreach ($encs as $e) {
+ $e_item = array(
+ $e->link, $e->type, $e->length);
+
+ array_push($enclosures, $e_item);
+ }
}
} else {