aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/session.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r--phpBB/includes/session.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index a478c8466e..b038039d9b 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -1130,10 +1130,12 @@ class user extends session
$sql = 'SELECT lang_id
FROM ' . LANG_TABLE . "
- WHERE lang_iso = '{$this->lang_name}'";
+ WHERE lang_iso = '" . $db->sql_escape($this->lang_name) . "'";
$result = $db->sql_query($sql);
+ $lang_id = (int) $db->sql_fetchfield('lang_id');
+ $db->sql_freeresult($result);
- return (int) $db->sql_fetchfield('lang_id', 0, $result);
+ return $lang_id;
}
// Get profile fields for user