Bugfix Function cutString

This commit is contained in:
Manfred Kindl
2017-11-20 20:06:03 +01:00
parent 4550b0f355
commit 0512b39ec3
+5 -1
View File
@@ -1062,6 +1062,10 @@ function cutString($string, $limit, $placeholderSign = '', $keepFilextension = f
$extension = '.'.pathinfo($string, PATHINFO_EXTENSION);
$offset = $offset + strlen($extension);
}
if(($limit - $offset) < 0)
{
return '<span class="error">$placeholderSign must not be shorter than $limit</span>';
}
if(strlen($string) > ($limit - $offset))
{
@@ -1069,7 +1073,7 @@ function cutString($string, $limit, $placeholderSign = '', $keepFilextension = f
}
else
{
return false;
return $string;
}
}
?>