Merge pull request #13749 from MrPetovan/bug/fatal-errors

Also catch TypeError exceptions in Repository\PostMedia
This commit is contained in:
Michael Vogel 2023-12-20 19:09:08 +01:00 committed by GitHub
commit e15e17732d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,7 +47,7 @@ class PostMedia extends BaseRepository
foreach ($rows as $fields) { foreach ($rows as $fields) {
try { try {
$Entities[] = $this->factory->createFromTableRow($fields); $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]); $this->logger->warning('Invalid media row', ['code' => $e->getCode(), 'message' => $e->getMessage(), 'fields' => $fields]);
} }
} }