From 9b50b63850c113f935bb09c9e3fb1bcfb2d5355f Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Mon, 23 May 2022 21:58:29 +0200 Subject: [PATCH 1/2] FIX PHP V8 warning $sameunits not initialy defined no default_lang needed (and field not present on stock class --- htdocs/product/stock/card.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index c2f8ddb4470..07ce1cde96e 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -6,6 +6,8 @@ * Copyright (C) 2016 Francis Appels * Copyright (C) 2021 Noé Cendrier * Copyright (C) 2021 Frédéric France + * Copyright (C) 2022 Charlene Benke + * * 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 '
'; From e89c80651b42a32de89d547b502bc85556266bae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 24 May 2022 21:09:12 +0200 Subject: [PATCH 2/2] Update card.php --- htdocs/product/stock/card.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 07ce1cde96e..252763ef43b 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -7,7 +7,6 @@ * Copyright (C) 2021 Noé Cendrier * Copyright (C) 2021 Frédéric France * Copyright (C) 2022 Charlene Benke - * * 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