1
0
mirror of https://github.com/flarum/core.git synced 2025-08-19 06:41:44 +02:00

No slug? Then no '-' separator! (#1351)

* Stop using slug separator when there is no slug

* Changing as per upstream requirements
This commit is contained in:
Johann Rodríguez
2018-02-08 20:52:50 +00:00
committed by Toby Zerner
parent c3a6f7daef
commit 7721288ac6
4 changed files with 5 additions and 4 deletions

View File

@@ -28,6 +28,6 @@ class Str
$str = preg_replace('/-+/', '-', $str);
$str = preg_replace('/-$|^-/', '', $str);
return $str ?: '-';
return $str;
}
}