Skip to content

Commit

Permalink
use dbObject
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala authored Aug 10, 2023
1 parent 43aecdb commit 418906d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AssetControlExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ private function hasAssets(): bool
{
$fields = DataObject::getSchema()->fieldSpecs($this->owner);
foreach ($fields as $field => $db) {
$fieldObj = $this->owner->$field;
$fieldObj = $this->owner->dbObject($field);
if ($fieldObj instanceof DBFile) {
return true;
}
Expand Down

0 comments on commit 418906d

Please sign in to comment.