From 04dd489ca1d93293adbabfe35d58b8bebe03c57f Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+github@gmail.com>
Date: Mon, 8 Nov 2021 12:06:01 +0100
Subject: [PATCH] replace all mb_* calls with their non multibyte version,
 fixes #398

---
 lib/models/SimpleCollection.class.php      | 2 +-
 lib/models/SimpleORMapCollection.class.php | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/models/SimpleCollection.class.php b/lib/models/SimpleCollection.class.php
index 49ebf6c9351..1a32491818c 100644
--- a/lib/models/SimpleCollection.class.php
+++ b/lib/models/SimpleCollection.class.php
@@ -688,7 +688,7 @@ class SimpleCollection extends StudipArrayObject
                     $value2 = static::translitLatin1(mb_substr($d2[$field], 0, 100));
                 }
                 $ret = $sort_func($value1, $value2);
-                if (mb_strtolower($dir) == 'desc') $ret = $ret * -1;
+                if (strtolower($dir) == 'desc') $ret = $ret * -1;
             } while ($ret === 0 && next($sorter));
 
             return $ret;
diff --git a/lib/models/SimpleORMapCollection.class.php b/lib/models/SimpleORMapCollection.class.php
index 6f10f219fc1..ee7dfbbb708 100644
--- a/lib/models/SimpleORMapCollection.class.php
+++ b/lib/models/SimpleORMapCollection.class.php
@@ -110,8 +110,8 @@ class SimpleORMapCollection extends SimpleCollection
      */
     public function setClassName($class_name)
     {
-        $this->relation_options['class_name'] = mb_strtolower($class_name);
-        $this->deleted->relation_options['class_name'] = mb_strtolower($class_name);
+        $this->relation_options['class_name'] = strtolower($class_name);
+        $this->deleted->relation_options['class_name'] = strtolower($class_name);
     }
 
     /**
@@ -131,7 +131,7 @@ class SimpleORMapCollection extends SimpleCollection
      */
     public function getClassName()
     {
-        return mb_strtolower($this->relation_options['class_name']);
+        return strtolower($this->relation_options['class_name']);
     }
 
     /**
@@ -236,4 +236,4 @@ class SimpleORMapCollection extends SimpleCollection
         }
         $this->storage = array_values($this->storage);
     }
-}
\ No newline at end of file
+}
-- 
GitLab