X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FNotifications%2FPing.php;h=df75c047afdd8b8c25d8f135743710db1e930786;hb=46660c94628bdbad2ce9b36368bb55df120497d3;hp=76cdd9f77055ce967968eda5d712fd6e07e3d651;hpb=f9ab5b0669864ecb6a5771c60f21ee42bee9a3a1;p=friendica.git diff --git a/src/Module/Notifications/Ping.php b/src/Module/Notifications/Ping.php index 76cdd9f770..df75c047af 100644 --- a/src/Module/Notifications/Ping.php +++ b/src/Module/Notifications/Ping.php @@ -48,6 +48,7 @@ use Friendica\Navigation\Notifications\Factory; use Friendica\Navigation\Notifications\Repository; use Friendica\Navigation\Notifications\ValueObject; use Friendica\Navigation\SystemMessages; +use Friendica\Network\HTTPException; use Friendica\Protocol\Activity; use Friendica\Util\DateTimeFormat; use Friendica\Util\Profiler; @@ -229,7 +230,11 @@ class Ping extends BaseModule // merge all notification types in one array foreach ($intros as $intro) { - $navNotifications[] = $this->formattedNavNotification->createFromIntro($intro); + try { + $navNotifications[] = $this->formattedNavNotification->createFromIntro($intro); + } catch (HTTPException\NotFoundException $e) { + $this->introductionRepo->delete($intro); + } } if (count($registrations) <= 1 || $this->pconfig->get($this->session->getLocalUserId(), 'system', 'detailed_notif')) { @@ -242,7 +247,7 @@ class Ping extends BaseModule new Uri($this->baseUrl->get(true) . '/moderation/users/pending') ); } - } elseif (count($registrations) > 1) { + } else { $navNotifications[] = $this->formattedNavNotification->createFromParams( $registrations[0]['name'], $registrations[0]['url'],