diff --git a/htdocs/product/admin/product_lot.php b/htdocs/product/admin/product_lot.php index edc9ad53fd2..77dff433356 100644 --- a/htdocs/product/admin/product_lot.php +++ b/htdocs/product/admin/product_lot.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 MDW * * 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 @@ -115,18 +116,16 @@ if ($action == 'updateMaskLot') { // Search template files $file = ''; $classname = ''; - $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir . "core/modules/product_batch/doc/pdf_" . $modele . ".modules.php", 0); if (file_exists($file)) { - $filefound = 1; $classname = "pdf_" . $modele; break; } } - if ($filefound) { + if ($classname !== '') { require_once $file; $module = new $classname($db);