slug generates uniqid in case the file/folder name contains not one single valid character
This commit is contained in:
parent
0900301668
commit
06992fec6d
|
@ -219,10 +219,8 @@ class Mapper
|
|||
// remove unwanted characters
|
||||
$text = preg_replace('~[^-\w]+~', '', $text);
|
||||
|
||||
if (empty($text))
|
||||
{
|
||||
// TODO: we better generate a guid in this case
|
||||
return 'n-a';
|
||||
if (empty($text)) {
|
||||
return uniqid();
|
||||
}
|
||||
|
||||
return $text;
|
||||
|
|
Loading…
Reference in New Issue