FIX PHP V8 warning

$sameunits not initialy defined
no default_lang needed (and field not present on stock class
This commit is contained in:
BENKE Charlene 2022-05-23 21:58:29 +02:00 committed by GitHub
parent eaa0170604
commit 9b50b63850
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,8 @@
* Copyright (C) 2016 Francis Appels <francis.appels@yahoo.com>
* Copyright (C) 2021 Noé Cendrier <noe.cendrier@altairis.fr>
* Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2022 Charlene Benke <charlene@patas-monkey.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -679,6 +681,8 @@ if ($action == 'create') {
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
$sameunits = true;
while ($i < $num) {
$objp = $db->fetch_object($resql);
@ -960,7 +964,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete') {
$delallowed = $usercancreate;
$modulepart = 'stock';
print $formfile->showdocuments($modulepart, $objectref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 0, 0, 0, 28, 0, '', 0, '', $object->default_lang, '', $object);
print $formfile->showdocuments($modulepart, $objectref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 0, 0, 0, 28, 0, '', 0, '', '', '', $object);
$somethingshown = $formfile->numoffiles;
print '</div><div class="fichehalfright">';