Skip to content

Commit

Permalink
[BUGFIX] Properly handle empty taxonomy relation
Browse files Browse the repository at this point in the history
  • Loading branch information
dogawaf committed Feb 15, 2024
1 parent 8da22e3 commit 7956782
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Classes/Domain/Repository/TermRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ public function findByRelation(string $tableName, string $fieldName, int $uid):
$sortingForeign[$row['uid_local']] = $row['sorting_foreign'];
}

if ($terms === []) {
return [];
}

// Load all the Extbase entities from the term's uid.
$queryResult = $this->loadExtbaseEntities($terms);

Expand All @@ -52,6 +56,10 @@ public function findOneByRelation(string $tableName, string $fieldName, int $uid
$terms[] = $row['uid_local'];
}

if ($terms === []) {
return null;
}

// Load all the Extbase entities from the term's uid.
$queryResult = $this->loadExtbaseEntities($terms);

Expand Down

0 comments on commit 7956782

Please sign in to comment.