fix php8 warning

This commit is contained in:
Frédéric FRANCE 2021-03-14 23:51:49 +01:00 committed by GitHub
parent 4ca0942229
commit bfd954b91e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2015 Yannick Warnier <ywarnier@beeznest.org> * Copyright (C) 2006-2015 Yannick Warnier <ywarnier@beeznest.org>
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2019 Eric Seigne <eric.seigne@cap-rel.fr> * Copyright (C) 2019 Eric Seigne <eric.seigne@cap-rel.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -116,16 +116,16 @@ if (empty($min)) {
// Define modetax (0 or 1) // Define modetax (0 or 1)
// 0=normal, 1=option vat for services is on debit, 2=option on payments for products // 0=normal, 1=option vat for services is on debit, 2=option on payments for products
$modetax = $conf->global->TAX_MODE; $modetax = (!empty($conf->global->TAX_MODE) ? $conf->global->TAX_MODE : 0);
if (GETPOSTISSET("modetax")) { if (GETPOSTISSET("modetax")) {
$modetax = GETPOST("modetax", 'int'); $modetax = GETPOSTINT("modetax");
} }
if (empty($modetax)) { if (empty($modetax)) {
$modetax = 0; $modetax = 0;
} }
// Security check // Security check
$socid = GETPOST('socid', 'int'); $socid = GETPOSTINT('socid');
if ($user->socid) { if ($user->socid) {
$socid = $user->socid; $socid = $user->socid;
} }
@ -242,7 +242,7 @@ if ($mysoc->tva_assuj) {
$vatsup .= ' ('.$langs->trans("ToGetBack").')'; $vatsup .= ' ('.$langs->trans("ToGetBack").')';
} }
$optioncss = GETPOST('optioncss'); $optioncss = GETPOST('optioncss', 'alpha');
if ($optioncss != "print") { if ($optioncss != "print") {
report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink, array(), $calcmode); report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink, array(), $calcmode);
} }