Merge pull request #13258 from atm-ph/fix_11.0_dict_sql_error_sortorder

Fix sql syntax error
This commit is contained in:
Laurent Destailleur 2020-03-03 22:54:11 +01:00 committed by GitHub
commit 6f3197bbea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -767,7 +767,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($keycode == 'sortorder') // For column name 'sortorder', we use the field name 'position'
{
$sql .= "'".(int) GETPOST('position', 'int');
$sql .= "'".(int) GETPOST('position', 'int')."'";
}
elseif ($_POST[$keycode] == '' && !($keycode == 'code' && $id == 10)) $sql .= "null"; // For vat, we want/accept code = ''
elseif ($keycode == 'content') {