Skip to content

Commit

Permalink
Merge pull request #33 from markusguenther/bugfix-stdClass-aray-cast
Browse files Browse the repository at this point in the history
BUGFIX: Cast stdClass tag to the expected array
  • Loading branch information
kdambekalns authored Nov 10, 2022
2 parents 9bb44a1 + 30da4d9 commit 6162368
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 6162368

Please sign in to comment.