fix phpstan

This commit is contained in:
Frédéric France 2024-12-10 20:09:39 +01:00
parent 99bf3064f1
commit 89121307ac
No known key found for this signature in database
GPG Key ID: CE25B0B7B53B9177
2 changed files with 7 additions and 25 deletions

View File

@ -34236,30 +34236,6 @@ parameters:
count: 1
path: ../../scripts/emailings/reset-invalid-emails.php
-
message: '#^Variable \$conf might not be defined\.$#'
identifier: variable.undefined
count: 2
path: ../../scripts/invoices/rebuild_merge_pdf.php
-
message: '#^Variable \$db might not be defined\.$#'
identifier: variable.undefined
count: 3
path: ../../scripts/invoices/rebuild_merge_pdf.php
-
message: '#^Variable \$hookmanager might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../scripts/invoices/rebuild_merge_pdf.php
-
message: '#^Variable \$langs might not be defined\.$#'
identifier: variable.undefined
count: 2
path: ../../scripts/invoices/rebuild_merge_pdf.php
-
message: '#^Variable \$user might not be defined\.$#'
identifier: variable.undefined

View File

@ -47,6 +47,12 @@ require_once DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php";
require_once DOL_DOCUMENT_ROOT."/core/modules/facture/modules_facture.php";
require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php";
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice2.lib.php';
/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Translate $langs
*/
// Load main language strings
$langs->load("main");
@ -77,7 +83,7 @@ if (!empty($dolibarr_main_db_readonly)) {
exit(1);
}
$diroutputpdf = $conf->facture->dir_output.'/temp';
$diroutputpdf = $conf->invoice->dir_output.'/temp';
$newlangid = 'en_EN'; // To force a new lang id
$filter = array();
$regenerate = ''; // Ask regenerate (contains name of model to use)