From 046019a29c82659573c79f2aa99eaba580412b1f Mon Sep 17 00:00:00 2001 From: hwala Date: Fri, 11 Aug 2023 15:18:48 +0200 Subject: [PATCH] fix: do not fail, if no tag property is present --- Classes/AssetSource/CantoAssetProxy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/AssetSource/CantoAssetProxy.php b/Classes/AssetSource/CantoAssetProxy.php index 78ba61c..8160180 100644 --- a/Classes/AssetSource/CantoAssetProxy.php +++ b/Classes/AssetSource/CantoAssetProxy.php @@ -81,7 +81,7 @@ public static function fromJsonObject(stdClass $jsonObject, CantoAssetSource $as $assetProxy->lastModified = \DateTime::createFromFormat('YmdHisv', $jsonObject->default->{'Date modified'}); $assetProxy->fileSize = (int)$jsonObject->size; $assetProxy->mediaType = MediaTypes::getMediaTypeFromFilename($jsonObject->name); - $assetProxy->tags = $jsonObject->tag ? (array)$jsonObject->tag : []; + $assetProxy->tags = isset($jsonObject->tag) ? (array)$jsonObject->tag : []; $assetProxy->iptcProperties['CopyrightNotice'] = $jsonObject->copyright ?? ($jsonObject->default->Copyright ?? '');