Skip to content

Commit 1884d94

Browse files
Bug fix: Use correct alias lookup method
A regression was introduced during the update to the newer Drupal version. I accidentally used the wrong alias lookup method, which only returns true, when what I really wanted was an array of matched paths.
1 parent 811c354 commit 1884d94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AliasGenerator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function createAllAliases(EntityInterface $entity) {
6363

6464
public function ensureAliasUnique($base, $langcode) {
6565
$alias = $base;
66-
for ($i = 1; $this->aliasRepository->pathHasMatchingAlias($alias, $langcode); $i++) {
66+
for ($i = 1; $this->aliasRepository->lookupByAlias($alias, $langcode); $i++) {
6767
$alias = implode('-', [$base, $i]);
6868
}
6969
return $alias;

0 commit comments

Comments
 (0)