From 686348a0d6b9a7ca62bea8ea9c4f670a01974703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Fri, 25 Dec 2015 11:47:48 +0100 Subject: [PATCH] FIX #4287 SQL error when accessing an unexisting proposal --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d11bf26d7c4..7db437150ca 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1026,7 +1026,7 @@ class Form $sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,"; $sql.= " re.description, re.fk_facture_source"; $sql.= " FROM ".MAIN_DB_PREFIX ."societe_remise_except as re"; - $sql.= " WHERE fk_soc = ".$socid; + $sql.= " WHERE fk_soc = ".(int) $socid; if ($filter) $sql.= " AND ".$filter; $sql.= " ORDER BY re.description ASC";