]> git.mxchange.org Git - friendica.git/commitdiff
Changed:
authorRoland Häder <roland@mxchange.org>
Wed, 13 Jul 2022 20:04:16 +0000 (22:04 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 13 Jul 2022 20:05:53 +0000 (22:05 +0200)
- added a final check on $link_item, as it might not be initialized or no
  record was found, thanks to @AlfredSK for reporting this
- see #11632

src/Navigation/Notifications/Factory/Notification.php

index 10c8b54a0e7073018dc2c624370d11a4ec6ad7ac..5c1f74df4fea981d21d6d3a084278b923b697b49 100644 (file)
@@ -183,6 +183,13 @@ class Notification extends BaseFactory implements ICanCreateFromTableRow
                                }
                        }
 
+                       // Final check on $link_item
+                       // @see https://github.com/friendica/friendica/issues/11632#issuecomment-1183365937
+                       if (empty($link_item)) {
+                               $this->logger->info('Link item is still empty. Dumping whole Notification object:', [$Notification]);
+                               return $message;
+                       }
+
                        $link = $this->baseUrl . '/display/' . urlencode($link_item['guid']);
 
                        $body = BBCode::toPlaintext($item['body'], false);