Skip to content
Snippets Groups Projects

Issue #3460536 by siliconandincense: TaxonomyEntityIndexDepth type conflict

1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -97,14 +97,14 @@ abstract class TaxonomyEntityIndexDepth extends IndexTidDepth {
if ($this->options['depth'] > 0) {
$subquery->leftJoin('taxonomy_term__parent', 'th', "th.entity_id = tn.tid");
$last = "th";
foreach (range(1, abs($this->options['depth'])) as $count) {
foreach (range(1, abs((int) $this->options['depth'])) as $count) {
$subquery->leftJoin('taxonomy_term__parent', "th$count", "$last.parent_target_id = th$count.entity_id");
$where->condition("th$count.entity_id", $tids, $operator);
$last = "th$count";
}
}
elseif ($this->options['depth'] < 0) {
foreach (range(1, abs($this->options['depth'])) as $count) {
foreach (range(1, abs((int) $this->options['depth'])) as $count) {
$subquery->leftJoin('taxonomy_term__parent', "th$count", "$last.entity_id = th$count.parent_target_id");
$where->condition("th$count.entity_id", $tids, $operator);
$last = "th$count";
Loading