Skip to content
Snippets Groups Projects
Commit 4292f9fd authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

prevent php8 warnings, fixes #2261

Closes #2261

Merge request studip/studip!1491
parent 430074ff
No related branches found
No related tags found
1 merge request!4Draft: Icon creation
...@@ -382,12 +382,12 @@ class Seminar_Auth ...@@ -382,12 +382,12 @@ class Seminar_Auth
*/ */
function auth_set_user_settings($user) function auth_set_user_settings($user)
{ {
$divided = explode("x", Request::get('resolution')); $divided = explode('x', Request::get('resolution'));
$this->auth["xres"] = ($divided[0] != 0) ? (int)$divided[0] : 1024; //default $this->auth["xres" . ""] = !empty($divided[0]) ? (int) $divided[0] : 1024; //default
$this->auth["yres"] = ($divided[1] != 0) ? (int)$divided[1] : 768; //default $this->auth['yres'] = !empty($divided[1]) ? (int)$divided[1] : 768; //default
// Change X-Resulotion on Multi-Screen Systems (as Matrox Graphic-Adapters are) // Change X-Resulotion on Multi-Screen Systems (as Matrox Graphic-Adapters are)
if (($this->auth["xres"] / $this->auth["yres"]) > 2) { if ($this->auth['xres'] / $this->auth['yres'] > 2) {
$this->auth["xres"] = $this->auth["xres"] / 2; $this->auth['xres'] = $this->auth['xres'] / 2;
} }
$user = User::toObject($user); $user = User::toObject($user);
//restore user-specific language preference //restore user-specific language preference
......
...@@ -43,7 +43,7 @@ if (Request::get('set_language')) { ...@@ -43,7 +43,7 @@ if (Request::get('set_language')) {
// store user-specific language preference // store user-specific language preference
if ($auth->is_authenticated() && $user->id != 'nobody') { if ($auth->is_authenticated() && $user->id != 'nobody') {
// store last language click // 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 = ?"; $query = "UPDATE user_info SET preferred_language = ? WHERE user_id = ?";
$statement = DBManager::get()->prepare($query); $statement = DBManager::get()->prepare($query);
$statement->execute([$_SESSION['forced_language'], $user->id]); $statement->execute([$_SESSION['forced_language'], $user->id]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment