php V8 warning

This commit is contained in:
This Charlène 2022-08-23 12:04:03 +02:00 committed by GitHub
parent 9f3ed07e87
commit 8c71118fa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -555,6 +555,7 @@ if (empty($reshook)) {
$ref_supplier = $productsupplier->ref_supplier;
// Get vat rate
$tva_npr = 0;
if (!GETPOSTISSET('tva_tx')) { // If vat rate not provided from the form (the form has the priority)
$tva_tx = get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice', 'alpha'));
$tva_npr = get_default_npr($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice', 'alpha'));
@ -667,11 +668,10 @@ if (empty($reshook)) {
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
$outputlangs = $langs;
$newlang = '';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
$newlang = GETPOST('lang_id', 'aZ09');
}
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) {
if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) {
$newlang = $object->thirdparty->default_lang;
if(GETPOST('lang_id', 'aZ09'))
$newlang = GETPOST('lang_id', 'aZ09');
}
if (!empty($newlang)) {
$outputlangs = new Translate("", $conf);