Fixed slugging in custom fields to no longer use old library

This commit is contained in:
snipe 2020-04-21 04:14:23 -07:00
parent c17106d1b3
commit 066e5588b5
No known key found for this signature in database
GPG key ID: 10BFFDA3ED34B5AC

View file

@ -336,7 +336,7 @@ class CustomField extends Model
if (!function_exists('transliterator_transliterate')) {
$long_slug = '_snipeit_' . str_slug(\Patchwork\Utf8::utf8_encode(trim($name)), '_');
} else {
$long_slug = '_snipeit_' . Utf8Slugger::slugify($name, '_');
$long_slug = '_snipeit_' . str_slug($name, '_');
}
return substr($long_slug, 0, 50) . '_' . $id;