1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-01 14:20:16 +02:00

fix: various bug fixes (#3102)

* fix: Undefined offset: 4

* fix: Trying to access array offset on value of type bool

* fix: Undefined variable: photo at bridges/TelegramBridge.php line 287

* fix: Trying to get property innertext of non-object at bridges/ZDNetBridge.php line 186

* fix: Undefined index: Category at bridges/UnraidCommunityApplicationsBridge.php line 42

* fix: Undefined index: fullUrl at bridges/EuronewsBridge.php line 61
This commit is contained in:
Dag
2022-10-16 20:26:33 +02:00
committed by GitHub
parent ffbc107687
commit 37f1ab726b
6 changed files with 82 additions and 71 deletions

View File

@@ -31,50 +31,52 @@ class UnraidCommunityApplicationsBridge extends BridgeAbstract
{
$this->fetchApps();
$this->sortApps();
Debug::log('Building RSS feed');
foreach ($this->apps as $app) {
if (!array_key_exists('Language', $app)) {
$item = [];
$item['title'] = $app['Name'];
$item['timestamp'] = $app['FirstSeen'];
$item['author'] = explode('\'', $app['Repo'])[0];
$item['categories'] = explode(' ', $app['Category']);
$item['content'] = '';
if (array_key_exists('Language', $app)) {
continue;
}
$item = [];
$item['title'] = $app['Name'];
$item['timestamp'] = $app['FirstSeen'];
$item['author'] = explode('\'', $app['Repo'])[0];
$item['content'] = '';
if (array_key_exists('Icon', $app)) {
$item['content'] .= '<img style="width: 64px" src="'
. $app['Icon']
. '">';
}
if (isset($app['CategoryList'])) {
$item['categories'] = $app['CategoryList'];
}
if (array_key_exists('Overview', $app)) {
$item['content'] .= '<p>'
. $app['Overview']
. '</p>';
}
if (array_key_exists('Icon', $app)) {
$item['content'] .= '<img style="width: 64px" src="'
. $app['Icon']
. '">';
}
if (array_key_exists('Project', $app)) {
$item['uri'] = $app['Project'];
}
if (array_key_exists('Overview', $app)) {
$item['content'] .= '<p>'
. $app['Overview']
. '</p>';
}
if (array_key_exists('Registry', $app)) {
$item['content'] .= '<br><a href="'
. $app['Registry']
. '">Docker Hub</a>';
}
if (array_key_exists('Project', $app)) {
$item['uri'] = $app['Project'];
}
if (array_key_exists('Support', $app)) {
$item['content'] .= '<br><a href="'
. $app['Support']
. '">Support</a>';
}
if (array_key_exists('Registry', $app)) {
$item['content'] .= '<br><a href="'
. $app['Registry']
. '">Docker Hub</a>';
}
$this->items[] = $item;
if (array_key_exists('Support', $app)) {
$item['content'] .= '<br><a href="'
. $app['Support']
. '">Support</a>';
}
if (count($this->items) >= 15) {
break;
}
$this->items[] = $item;
if (count($this->items) >= 150) {
break;
}
}
}