{
return new Entity\PostMedia(
$row['uri-id'],
- UtilNetwork::createUriFromString($row['url']) ?: '',
+ UtilNetwork::createUriFromString($row['url']),
$row['type'],
$this->mimeTypeFactory->createFromContentType($row['mimetype']),
$row['media-uri-id'],
$Entities = new Collection\PostMedias();
foreach ($rows as $fields) {
- $Entities[] = $this->factory->createFromTableRow($fields);
+ try {
+ $Entities[] = $this->factory->createFromTableRow($fields);
+ } catch (\Exception $e) {
+ $this->logger->warning('Invalid media row', ['code' => $e->getCode(), 'message' => $e->getMessage(), 'fields' => $fields]);
+ }
}
return $Entities;