From 30da4d9e811e9a67bad95fc75e8113e752fa72fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20G=C3=BCnther?= Date: Wed, 9 Nov 2022 19:33:35 +0100 Subject: [PATCH] BUGFIX: Cast stdClass tag to the expected array Fixes: #32 --- 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 97ab72b..78ba61c 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 ?? []; + $assetProxy->tags = $jsonObject->tag ? (array)$jsonObject->tag : []; $assetProxy->iptcProperties['CopyrightNotice'] = $jsonObject->copyright ?? ($jsonObject->default->Copyright ?? '');