]> git.mxchange.org Git - friendica.git/commitdiff
Also catch TypeError exceptions in Repository\PostMedia
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 20 Dec 2023 14:50:49 +0000 (09:50 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 20 Dec 2023 14:50:49 +0000 (09:50 -0500)
- Address "Uncaught Exception TypeError: "Friendica\Content\Post\Entity\PostMedia::__construct(): Argument #2 ($url) must be of type Psr\Http\Message\UriInterface, null given"

src/Content/Post/Repository/PostMedia.php

index 70441e0c9d881c892406e4736ef9328c7ae6a81f..4f050a378f9ca5d942a311edf255b6207df980fb 100644 (file)
@@ -47,7 +47,7 @@ class PostMedia extends BaseRepository
                foreach ($rows as $fields) {
                        try {
                                $Entities[] = $this->factory->createFromTableRow($fields);
-                       } catch (\Exception $e) {
+                       } catch (\Throwable $e) {
                                $this->logger->warning('Invalid media row', ['code' => $e->getCode(), 'message' => $e->getMessage(), 'fields' => $fields]);
                        }
                }