fix: php notices (#3482)

* fix(furaffinity): notice

* fox(releases3ds): remove references to non-existing vars
This commit is contained in:
Dag 2023-07-03 10:48:33 +02:00 committed by GitHub
parent d8bc015efc
commit 48385777b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 7 deletions

View file

@ -900,10 +900,16 @@ class FurAffinityBridge extends BridgeAbstract
$submissionHTML = $this->getFASimpleHTMLDOM($submissionURL, $cache); $submissionHTML = $this->getFASimpleHTMLDOM($submissionURL, $cache);
$stats = $submissionHTML->find('.stats-container', 0); $stats = $submissionHTML->find('.stats-container', 0);
$item['timestamp'] = strtotime($stats->find('.popup_date', 0)->title); $popupDate = $stats->find('.popup_date', 0);
$item['enclosures'] = [ if ($popupDate) {
$submissionHTML->find('.actions a[href^=https://d.facdn]', 0)->href $item['timestamp'] = strtotime($popupDate->title);
]; }
$var = $submissionHTML->find('.actions a[href^=https://d.facdn]', 0);
if ($var) {
$item['enclosures'] = [$var->href];
}
foreach ($stats->find('#keywords a') as $keyword) { foreach ($stats->find('#keywords a') as $keyword) {
$item['categories'][] = $keyword->plaintext; $item['categories'][] = $keyword->plaintext;
} }

View file

@ -82,10 +82,10 @@ class Releases3DSBridge extends BridgeAbstract
$item = []; $item = [];
$item['title'] = $name; $item['title'] = $name;
$item['author'] = $publisher; $item['author'] = $publisher;
$item['timestamp'] = $ignDate; //$item['timestamp'] = $ignDate;
$item['enclosures'] = [$ignCoverArt]; //$item['enclosures'] = [$ignCoverArt];
$item['uri'] = empty($ignLink) ? $searchLinkDuckDuckGo : $ignLink; $item['uri'] = empty($ignLink) ? $searchLinkDuckDuckGo : $ignLink;
$item['content'] = $ignDescription . $releaseDescription . $releaseSearchLinks; $item['content'] = $releaseDescription . $releaseSearchLinks;
$this->items[] = $item; $this->items[] = $item;
$limit++; $limit++;
} }