summaryrefslogtreecommitdiff
path: root/providers/Facebook.php
diff options
context:
space:
mode:
Diffstat (limited to 'providers/Facebook.php')
-rw-r--r--providers/Facebook.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/providers/Facebook.php b/providers/Facebook.php
index 2126189..811ba04 100644
--- a/providers/Facebook.php
+++ b/providers/Facebook.php
@@ -51,12 +51,14 @@ class Facebook extends \Providers\HtmlFeed {
foreach ($div->find('div>span p') as $p) {
$texts[] = trim(strip_tags($p->html()));
}
- $items[$key] = [
- 'id' => $key,
- 'content' => $div->html(),
- 'texts' => $texts,
- 'time' => $pIns['post_context']['publish_time']
- ];
+ if (count($texts)) {
+ $items[$key] = [
+ 'id' => $key,
+ 'content' => $div->html(),
+ 'texts' => $texts,
+ 'time' => $pIns['post_context']['publish_time']
+ ];
+ }
}
}
return array_values($items);