We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc792ec commit b3ca785Copy full SHA for b3ca785
app/Lio/Forum/Threads/Thread.php
@@ -71,11 +71,11 @@ private function generateNewSlug()
71
{
72
$i = 0;
73
74
- while ($this->getCountBySlug($this->generateSlugByIncrementer($i)) > 0) {
75
- $i++;
76
- }
+ do {
+ $slug = $this->generateSlugByIncrementer($i++);
+ } while ($this->getCountBySlug($slug) > 0);
77
78
- return $this->generateSlugByIncrementer($i);
+ return $slug;
79
}
80
81
private function getCountBySlug($slug)
0 commit comments