Skip to content

Commit

Permalink
Merge pull request #14 from lsst-epo/EPO-6394
Browse files Browse the repository at this point in the history
Put in more if checks to validate asset ID
  • Loading branch information
ericdrosas87 authored Jun 9, 2022
2 parents 8d0fbec + a1bfa1a commit 3dc6799
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fields/DAMAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function getInputHtml($value, ElementInterface $element = null): string {
$assetId = $assetId[0];
Craft::info("about to log assetId inside of first IF", "UDAMI");
Craft::info($assetId, "UDAMI");
if(is_int(intval($assetId))) { // value will likely come back as string, but may come back as "[]"
if($assetId != [] && $assetId != "[]" && is_int(intval($assetId))) { // value will likely come back as string, but may come back as "[]"
Craft::info("inside of the second IF!", "UDAMI");
$metadata = $this->getAssetMetadataByAssetId($assetId);
Craft::info("about to log metadata", "UDAMI");
Expand Down

0 comments on commit 3dc6799

Please sign in to comment.