Commit 1afcad59 authored by skummer's avatar skummer

ZP-171

- fixed: make sure Utils::Utf8_truncate() always uses an integer as length

git-svn-id: https://z-push.org/svn/z-push/trunk@1378 b7dd7b3b-3a3c-0410-9da9-bee62a6cc5b5
parent 20376ff5
...@@ -316,6 +316,9 @@ class Utils { ...@@ -316,6 +316,9 @@ class Utils {
* @return string truncated string * @return string truncated string
*/ */
static public function Utf8_truncate($string, $length) { static public function Utf8_truncate($string, $length) {
// make sure length is always an interger
$length = (int)$length;
if (strlen($string) <= $length) if (strlen($string) <= $length)
return $string; return $string;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment