mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-16 13:34:11 +02:00
fix: php errors (notices) (#3115)
This commit is contained in:
@@ -150,8 +150,6 @@ class RedditBridge extends BridgeAbstract
|
||||
$flair = '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
foreach ($subreddits as $subreddit) {
|
||||
$name = trim($subreddit);
|
||||
$values = getContents(self::URI
|
||||
@@ -207,14 +205,17 @@ class RedditBridge extends BridgeAbstract
|
||||
|
||||
$item['content']
|
||||
= htmlspecialchars_decode($data->selftext_html);
|
||||
} elseif (isset($data->post_hint) ? $data->post_hint == 'link' : false) {
|
||||
} elseif (isset($data->post_hint) && $data->post_hint == 'link') {
|
||||
// Link with preview
|
||||
|
||||
if (isset($data->media)) {
|
||||
// Reddit embeds content for some sites (e.g. Twitter)
|
||||
$embed = htmlspecialchars_decode(
|
||||
$data->media->oembed->html
|
||||
);
|
||||
// todo: maybe switch on the type
|
||||
if (isset($data->media->oembed->html)) {
|
||||
// Reddit embeds content for some sites (e.g. Twitter)
|
||||
$embed = htmlspecialchars_decode($data->media->oembed->html);
|
||||
} else {
|
||||
$embed = '';
|
||||
}
|
||||
} else {
|
||||
$embed = '';
|
||||
}
|
||||
|
Reference in New Issue
Block a user