From cc7ad5299f1bd14155d4c01af3a4ece28f85c20c Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Thu, 10 Jan 2019 22:44:39 +0100 Subject: bug fixies --- app/fn/fn.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/fn/fn.php') diff --git a/app/fn/fn.php b/app/fn/fn.php index dfee01d..fd609c1 100644 --- a/app/fn/fn.php +++ b/app/fn/fn.php @@ -77,7 +77,11 @@ function idclean(string $input) $replace = ['e', 'a', 'e', 'c', 'u', 'i', 'i', '-']; $input = str_replace($search, $replace, $input); - return preg_replace('%[^a-z0-9-_+]%', '', strtolower(trim($input))); + $input = preg_replace('%[^a-z0-9-_+]%', '', strtolower(trim($input))); + + $input = substr($input, 0, Model::MAX_ID_LENGTH); + + return $input; } -- cgit v1.2.3