summaryrefslogtreecommitdiff
path: root/api/img_adt_svc_relais.php
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2016-08-28 10:24:42 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2016-08-28 10:24:42 +0200
commitdc26f4210708668ab860ab9169e65a56f1958a2a (patch)
tree0fb7523f388055c748e911eae6b5103d72c6fe5e /api/img_adt_svc_relais.php
parent53bee7f8fc073d2128f9b542e2b676b4fd3e8b84 (diff)
downloadchd_gestion-dc26f4210708668ab860ab9169e65a56f1958a2a.zip
chd_gestion-dc26f4210708668ab860ab9169e65a56f1958a2a.tar.gz
chd_gestion-dc26f4210708668ab860ab9169e65a56f1958a2a.tar.bz2
Same security fix for others API scripts
Diffstat (limited to 'api/img_adt_svc_relais.php')
-rw-r--r--api/img_adt_svc_relais.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/api/img_adt_svc_relais.php b/api/img_adt_svc_relais.php
index d9681c2..ba1be49 100644
--- a/api/img_adt_svc_relais.php
+++ b/api/img_adt_svc_relais.php
@@ -21,8 +21,11 @@
include_once('inc/config.php');
$mysqli = new mysqli($db_config['host'], $db_config['username'], $db_config['password'], $db_config['database']);
+if (mysqli_connect_errno()) {
+ die(mysqli_connect_error());
+}
unset($db_config);
-$mysqli->query("SET NAMES 'utf8'");
+$mysqli->set_charset("utf8") or die($mysqli->error);
$opt_show_source=array_key_exists('s', $_GET);
$opt_embed=array_key_exists('e', $_GET);