From a529725c5c270957747853b6bcf93b5c7fe02532 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Nov 2017 17:42:46 +0100 Subject: [PATCH] Fix lang code must be null if not defined --- htdocs/admin/mails_templates.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index 668f7be3515..77f969181f4 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -270,6 +270,7 @@ if (empty($reshook)) if ($value == 'private' && ! is_numeric($_POST[$keycode])) $_POST[$keycode]='0'; if ($value == 'position' && ! is_numeric($_POST[$keycode])) $_POST[$keycode]='1'; if ($_POST[$keycode] == '' && $keycode != 'langcode') $sql.="null"; // lang must be '' if not defined so the unique key that include lang will work + elseif ($_POST[$keycode] == '0' && $keycode == 'langcode') $sql.="null"; else $sql.="'".$db->escape($_POST[$keycode])."'"; $i++; }