From 07e7d77c3bb986db9538cf2da2d291784c4c173c Mon Sep 17 00:00:00 2001
From: Fredric Mitchell <14300-fmitchell@users.noreply.drupalcode.org>
Date: Fri, 20 Sep 2024 22:57:00 +0000
Subject: [PATCH] Issue #3475831 by thony1199, fmitchell: Fix type error in
 TaxonomyEntityIndexDepth: abs() expects int|float, string given

---
 src/Plugin/views/filter/TaxonomyEntityIndexTidDepth.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Plugin/views/filter/TaxonomyEntityIndexTidDepth.php b/src/Plugin/views/filter/TaxonomyEntityIndexTidDepth.php
index dd30bab..74447f8 100644
--- a/src/Plugin/views/filter/TaxonomyEntityIndexTidDepth.php
+++ b/src/Plugin/views/filter/TaxonomyEntityIndexTidDepth.php
@@ -121,14 +121,14 @@ class TaxonomyEntityIndexTidDepth extends TaxonomyIndexTidDepth implements Conta
     if ($this->options['depth'] > 0) {
       $subquery->leftJoin('taxonomy_term__parent', 'th', "th.entity_id = tei.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", $this->value, $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", $this->value, $operator);
         $last = "th$count";
-- 
GitLab