From: Hypolite Petovan Date: Wed, 20 Dec 2023 14:50:49 +0000 (-0500) Subject: Also catch TypeError exceptions in Repository\PostMedia X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9024fc1226304070b49e06a1fd845c0be3b1b5eb;p=friendica.git 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" --- 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]); } }