Skip to content

Commit aea8302

Browse files
Lútsen StellingwerffLútsen Stellingwerff
Lútsen Stellingwerff
authored and
Lútsen Stellingwerff
committed
Use uniqueid() instead of bean id.
1 parent 011ccbe commit aea8302

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Slug.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ private function makeSlug($bean, $property_name, $slug_string) {
124124
if ( $this->uniqueSlug( $bean, $property_name, $slug ) ) {
125125
return $slug;
126126
} else {
127-
return $slug . '-' . $bean->id;
127+
// Create slug with uniqid() and check again
128+
return $this->makeSlug( $bean, $property_name, $slug . '-' . uniqid() );
128129
}
129130
}
130131

0 commit comments

Comments
 (0)