Skip to content

Commit

Permalink
Merge pull request #36 from MiauzGenau/tag-missing-robustness-improve…
Browse files Browse the repository at this point in the history
…ment

BUGFIX: do not fail, if no tag property is present
  • Loading branch information
kdambekalns authored Aug 14, 2023
2 parents 6162368 + 046019a commit a71bcac
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 ? (array)$jsonObject->tag : [];
$assetProxy->tags = isset($jsonObject->tag) ? (array)$jsonObject->tag : [];

$assetProxy->iptcProperties['CopyrightNotice'] = $jsonObject->copyright ?? ($jsonObject->default->Copyright ?? '');

Expand Down

0 comments on commit a71bcac

Please sign in to comment.