From 9024fc1226304070b49e06a1fd845c0be3b1b5eb Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 20 Dec 2023 09:50:49 -0500 Subject: [PATCH] Also catch TypeError exceptions in Repository\PostMedia - 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Content/Post/Repository/PostMedia.php b/src/Content/Post/Repository/PostMedia.php index 70441e0c9d..4f050a378f 100644 --- a/src/Content/Post/Repository/PostMedia.php +++ b/src/Content/Post/Repository/PostMedia.php @@ -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]); } } -- 2.39.5