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"
This commit is contained in:
Hypolite Petovan 2023-12-20 09:50:49 -05:00
parent 8fbcdd371e
commit 9024fc1226

View 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]);
}
}