diff --git a/Services/Object/classes/class.ilObject.php b/Services/Object/classes/class.ilObject.php index 733c70640d06..26ea235d0e7e 100755 --- a/Services/Object/classes/class.ilObject.php +++ b/Services/Object/classes/class.ilObject.php @@ -1581,7 +1581,7 @@ public function cloneObject(int $target_id, int $copy_id = 0, bool $omit_tree = $this->obj_log->debug("omit_tree: " . $omit_tree); if (!$options->isTreeCopyDisabled() && !$omit_tree) { $title_with_suffix = $this->appendCopyInfo($target_id, $copy_id); - $title = strlen($title_with_suffix) < self::TITLE_LENGTH ? $title_with_suffix : $title; + $title = mb_strlen($title_with_suffix) < self::TITLE_LENGTH ? $title_with_suffix : $title; $this->obj_log->debug("title incl. copy info: " . $title); } @@ -1705,7 +1705,7 @@ private function appendCopyInfoToTranslations( $new_languages = []; $installed_langs = $this->lng->getInstalledLanguages(); - foreach($obj_translations->getLanguages() as $language) { + foreach ($obj_translations->getLanguages() as $language) { $lang_code = $language->getLanguageCode(); $suffix_lang = $lang_code; if (!in_array($suffix_lang, $installed_langs)) { @@ -1730,7 +1730,7 @@ private function getCallbackForTitlesPerLanguageTransformation(): callable { return function (array $npl, ?ilObjectTranslation $nt): array { $langs = $nt->getLanguages(); - foreach($langs as $lang) { + foreach ($langs as $lang) { if (!array_key_exists($lang->getLanguageCode(), $npl)) { $npl[$lang->getLanguageCode()] = []; }