Skip to content

Commit ae02415

Browse files
authored
Fix(Core): Fix SQL query (#344)
1 parent 71eb892 commit ae02415

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

inc/baseclass.class.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ public function __construct($config = [])
5858
global $DB, $LANG;
5959

6060
//force MySQL DATE_FORMAT in user locale
61-
$query = "SET lc_time_names = '" . $_SESSION['glpilanguage'] . "'";
62-
$DB->doQuery($query);
61+
$query = "SET lc_time_names = ?";
62+
$stmt = $DB->prepare($query);
63+
$stmt->bind_param("s", $_SESSION['glpilanguage']);
64+
$stmt->execute();
6365

6466
if (empty($config)) {
6567
return;

0 commit comments

Comments
 (0)