Skip to content

Commit 525f4df

Browse files
authored
Merge pull request #1704 from misticwonder/fix-ubase
fix ubase
2 parents d497a17 + 694f984 commit 525f4df

File tree

1 file changed

+1
-1
lines changed
  • lib/Gedmo/Sluggable/Mapping/Event/Adapter

1 file changed

+1
-1
lines changed

lib/Gedmo/Sluggable/Mapping/Event/Adapter/ORM.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function getSimilarSlugs($object, $meta, array $config, $slug)
4242
} else {
4343
$mapping = false;
4444
}
45-
if ($ubase && !$mapping) {
45+
if (($ubase || $ubase === 0) && !$mapping) {
4646
$qb->andWhere('rec.'.$config['unique_base'].' = :unique_base');
4747
$qb->setParameter(':unique_base', $ubase);
4848
} elseif ($ubase && $mapping && in_array($mapping['type'], array(ClassMetadataInfo::ONE_TO_ONE, ClassMetadataInfo::MANY_TO_ONE))) {

0 commit comments

Comments
 (0)