Skip to content

Commit

Permalink
BUGFIX: Cast stdClass tag to the expected array
Browse files Browse the repository at this point in the history
Fixes: #32
  • Loading branch information
markusguenther authored Nov 9, 2022
1 parent 9bb44a1 commit 30da4d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/AssetSource/CantoAssetProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? '');

Expand Down

0 comments on commit 30da4d9

Please sign in to comment.