From 44ff73f5de338d35ef976976052bcf6bbb1b86b9 Mon Sep 17 00:00:00 2001 From: Maksim Stojkovic <18454392+maksimstojkovic@users.noreply.github.com> Date: Fri, 17 Sep 2021 23:50:00 +1000 Subject: [PATCH] Remove unused $nblines assignment Fixes the following warning received when attempting to generate a warehouse stock document using the default template: `count(): Parameter must be an array or an object that implements Countable in /var/www/html/core/modules/stock/doc/pdf_standard.modules.php on line 211`. $nblines is subsequently assigned on line 326, after which it is then used. --- htdocs/core/modules/stock/doc/pdf_standard.modules.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 5374245cea4..0c627322d69 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -208,8 +208,6 @@ class pdf_standard extends ModelePDFStock // Load traductions files required by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries")); - $nblines = count($object->lines); - if ($conf->stock->dir_output) { // Definition of $dir and $file if ($object->specimen) {