Skip to content

Commit c9624a4

Browse files
committed
Include the taxonomy in the unique callback ...
This fixes an issue when you have two terms with the same slug in different taxonomies, only one will be returned when querying.
1 parent ee8c874 commit c9624a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Stache/Query/TermQueryBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected function getFilteredKeys()
6161
: $this->getKeysFromTaxonomiesWithWheres($taxonomies, $this->wheres);
6262

6363
return $keys->unique(function ($key) {
64-
return explode('::', $key)[2];
64+
return collect(explode('::', $key))->forget(1)->join('::');
6565
});
6666
}
6767

0 commit comments

Comments
 (0)