mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-02 09:04:44 +02:00
fix: various php notices (#3145)
* fix: notice * fix: Trying to get property content of non-object at bridges/PcGamerBridge.php line 36 * fix: better exception message * fix: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
This commit is contained in:
parent
734a5868b8
commit
95c199c2eb
5 changed files with 13 additions and 8 deletions
|
@ -28,7 +28,12 @@ class PcGamerBridge extends BridgeAbstract
|
|||
$item['title'] = $articleHtml->find('meta[name=parsely-title]', 0)->content;
|
||||
$item['content'] = html_entity_decode($articleHtml->find('meta[name=description]', 0)->content);
|
||||
$item['author'] = $articleHtml->find('meta[name=parsely-author]', 0)->content;
|
||||
$item['enclosures'][] = $articleHtml->find('meta[name=parsely-image-url]', 0)->content;
|
||||
|
||||
$imageUrl = $articleHtml->find('meta[name=parsely-image-url]', 0);
|
||||
if ($imageUrl) {
|
||||
$item['enclosures'][] = $imageUrl->content;
|
||||
}
|
||||
|
||||
/* I don't know why every article has two extra tags, but because
|
||||
one matches another common tag, "guide," it needs to be removed. */
|
||||
$item['categories'] = array_diff(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue