aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2023-03-03 20:07:18 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2023-03-03 20:07:18 +0000
commit4292f9fd57bf9869a256674ce3bec938ec11e4ec (patch)
treed7eaf9d24b0bcc9d00881315e292c9152c22af0b /public
parent430074ffa822c2456cabbbe77413fd2d615db7d4 (diff)
prevent php8 warnings, fixes #2261
Closes #2261 Merge request studip/studip!1491
Diffstat (limited to 'public')
-rw-r--r--public/index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/public/index.php b/public/index.php
index 4cc7a87..429a35e 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]);