Skip to content

Commit

Permalink
chore: Resolve issue passing null to img()
Browse files Browse the repository at this point in the history
  • Loading branch information
hellopablo committed Oct 6, 2023
1 parent cfeae7e commit bfe7402
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Admin/Controller/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ public function __construct()
$this->aConfig['INDEX_FIELDS']['Value'] = function (\Nails\Cms\Resource\Block $oBlock) use ($oModel) {
switch ($oBlock->type) {
case $oModel::TYPE_IMAGE:
return img(cdnCrop((int) $oBlock->value ?: null, 50, 50));
$sUrl = cdnCrop((int) $oBlock->value ?: null, 50, 50);

Check failure on line 83 in src/Admin/Controller/Block.php

View workflow job for this annotation

GitHub Actions / build_and_test

Function cdnCrop not found.
return $sUrl ? img($sUrl) : '';

Check failure on line 84 in src/Admin/Controller/Block.php

View workflow job for this annotation

GitHub Actions / build_and_test

Function img not found.
break;

case $oModel::TYPE_FILE:
Expand Down

0 comments on commit bfe7402

Please sign in to comment.