diff options
-rw-r--r-- | include/items.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php index 9e448e39a..6dd214bec 100644 --- a/include/items.php +++ b/include/items.php @@ -5761,8 +5761,13 @@ function get_recursive_thr_parents(array $item): array|null dbesc($mid) ); + if (!$x) { + break; + } + $mid = $x[0]['thr_parent']; $thr_parents[] = $x[0]['thr_parent']; + $i++; } |