diff --git a/lib/phplib/Seminar_Auth.class.php b/lib/phplib/Seminar_Auth.class.php
index 3a915e56fb1a324916cd505da26a7966c9c62f73..fd3080fe1422387eb6b994e3930f609eeaaea56c 100644
--- a/lib/phplib/Seminar_Auth.class.php
+++ b/lib/phplib/Seminar_Auth.class.php
@@ -382,12 +382,12 @@ class Seminar_Auth
      */
     function auth_set_user_settings($user)
     {
-        $divided = explode("x", Request::get('resolution'));
-        $this->auth["xres"] = ($divided[0] != 0) ? (int)$divided[0] : 1024; //default
-        $this->auth["yres"] = ($divided[1] != 0) ? (int)$divided[1] : 768; //default
+        $divided = explode('x', Request::get('resolution'));
+        $this->auth["xres" . ""] = !empty($divided[0]) ? (int) $divided[0] : 1024; //default
+        $this->auth['yres'] = !empty($divided[1]) ? (int)$divided[1] : 768; //default
         // Change X-Resulotion on Multi-Screen Systems (as Matrox Graphic-Adapters are)
-        if (($this->auth["xres"] / $this->auth["yres"]) > 2) {
-            $this->auth["xres"] = $this->auth["xres"] / 2;
+        if ($this->auth['xres'] / $this->auth['yres'] > 2) {
+            $this->auth['xres'] = $this->auth['xres'] / 2;
         }
         $user = User::toObject($user);
         //restore user-specific language preference
diff --git a/public/index.php b/public/index.php
index 4cc7a8721f3a36d6b8ee3d52de5471224f1f5bea..429a35e9b0c353f0f2ca69a8005dede9772a1b88 100644
--- a/public/index.php
+++ b/public/index.php
@@ -43,7 +43,7 @@ if (Request::get('set_language')) {
 // store user-specific language preference
 if ($auth->is_authenticated() && $user->id != 'nobody') {
     // store last language click
-    if (mb_strlen($_SESSION['forced_language'])) {
+    if (!empty($_SESSION['forced_language'])) {
         $query = "UPDATE user_info SET preferred_language = ? WHERE user_id = ?";
         $statement = DBManager::get()->prepare($query);
         $statement->execute([$_SESSION['forced_language'], $user->id]);