From fdd642c5cc69b1daba9d0ef60e7526c37e76ca90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9lina=20JOUM?= Date: Wed, 26 Feb 2025 11:27:01 +0100 Subject: [PATCH 1/5] FIX: Retrieves the name of external or internal PDF --- htdocs/core/ajax/onlineSign.php | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/htdocs/core/ajax/onlineSign.php b/htdocs/core/ajax/onlineSign.php index abe7725bfe0..f24ed4e9b36 100644 --- a/htdocs/core/ajax/onlineSign.php +++ b/htdocs/core/ajax/onlineSign.php @@ -151,9 +151,10 @@ if ($action == "importSignature") { $directdownloadlink = $object->getLastMainDocLink('proposal'); // url to download the $object->last_main_doc if (preg_match('/\.pdf/i', $last_main_doc_file)) { - // TODO Use the $last_main_doc_file to defined the $newpdffilename and $sourcefile - $newpdffilename = $upload_dir . $ref . "_signed-" . $date . ".pdf"; - $sourcefile = $upload_dir . $ref . ".pdf"; + $ref_pdf = pathinfo($last_main_doc_file, PATHINFO_FILENAME); // Retrieves the name of external or internal PDF + + $newpdffilename = $upload_dir . $ref_pdf . "_signed-" . $date . ".pdf"; + $sourcefile = $upload_dir . $ref_pdf . ".pdf"; if (dol_is_file($sourcefile)) { $parameters = array('sourcefile' => $sourcefile, 'newpdffilename' => $newpdffilename); @@ -353,9 +354,10 @@ if ($action == "importSignature") { $directdownloadlink = $object->getLastMainDocLink('contrat'); // url to download the $object->last_main_doc if (preg_match('/\.pdf/i', $last_main_doc_file)) { - // TODO Use the $last_main_doc_file to defined the $newpdffilename and $sourcefile - $newpdffilename = $upload_dir . $ref . "_signed-" . $date . ".pdf"; - $sourcefile = $upload_dir . $ref . ".pdf"; + $ref_pdf = pathinfo($last_main_doc_file, PATHINFO_FILENAME); // Retrieves the name of external or internal PDF + + $newpdffilename = $upload_dir . $ref_pdf . "_signed-" . $date . ".pdf"; + $sourcefile = $upload_dir . $ref_pdf . ".pdf"; if (dol_is_file($sourcefile)) { $parameters = array('sourcefile' => $sourcefile, 'newpdffilename' => $newpdffilename); @@ -489,9 +491,10 @@ if ($action == "importSignature") { $directdownloadlink = $object->getLastMainDocLink('fichinter'); // url to download the $object->last_main_doc if (preg_match('/\.pdf/i', $last_main_doc_file)) { - // TODO Use the $last_main_doc_file to defined the $newpdffilename and $sourcefile - $newpdffilename = $upload_dir . $ref . "_signed-" . $date . ".pdf"; - $sourcefile = $upload_dir . $ref . ".pdf"; + $ref_pdf = pathinfo($last_main_doc_file, PATHINFO_FILENAME); // Retrieves the name of external or internal PDF + + $newpdffilename = $upload_dir . $ref_pdf . "_signed-" . $date . ".pdf"; + $sourcefile = $upload_dir . $ref_pdf . ".pdf"; if (dol_is_file($sourcefile)) { $parameters = array('sourcefile' => $sourcefile, 'newpdffilename' => $newpdffilename); @@ -839,9 +842,10 @@ if ($action == "importSignature") { $directdownloadlink = $object->getLastMainDocLink('expedition'); // url to download the $object->last_main_doc if (preg_match('/\.pdf/i', $last_main_doc_file)) { - // TODO Use the $last_main_doc_file to defined the $newpdffilename and $sourcefile - $newpdffilename = $upload_dir . $ref . "_signed-" . $date . ".pdf"; - $sourcefile = $upload_dir . $ref . ".pdf"; + $ref_pdf = pathinfo($last_main_doc_file, PATHINFO_FILENAME); // Retrieves the name of external or internal PDF + + $newpdffilename = $upload_dir . $ref_pdf . "_signed-" . $date . ".pdf"; + $sourcefile = $upload_dir . $ref_pdf . ".pdf"; if (dol_is_file($sourcefile)) { $parameters = array('sourcefile' => $sourcefile, 'newpdffilename' => $newpdffilename); From 5d775dcb5d004320eb0498e96d91fe0ee09f7bf3 Mon Sep 17 00:00:00 2001 From: dolibarr95 <24292300+dolibarr95@users.noreply.github.com> Date: Thu, 6 Mar 2025 08:44:39 +0100 Subject: [PATCH 2/5] Add $includemonday var Related to https://www.dolibarr.fr/forum/t/erreur-sur-calcul-de-conges/48690/43?u=dolibarr95 --- htdocs/core/lib/date.lib.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 181ce34976d..02e33450c72 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -975,24 +975,30 @@ function num_public_holiday($timestampStart, $timestampEnd, $country_code = '', // If we have to include Friday, Saturday and Sunday if (!$ferie) { - if ($includefriday || $includesaturday || $includesunday) { + if ($includefriday || $includesaturday || $includesunday || $includemonday) { $jour_julien = unixtojd($timestampStart); $jour_semaine = jddayofweek($jour_julien, 0); - if ($includefriday) { //Friday (5), Saturday (6) and Sunday (0) + //Monday (1), Friday (5), Saturday (6) and Sunday (0) + if ($includefriday) { if ($jour_semaine == 5) { $ferie = true; } } - if ($includesaturday) { //Friday (5), Saturday (6) and Sunday (0) + if ($includesaturday) { if ($jour_semaine == 6) { $ferie = true; } } - if ($includesunday) { //Friday (5), Saturday (6) and Sunday (0) + if ($includesunday) { if ($jour_semaine == 0) { $ferie = true; } } + if ($includemonday) { + if ($jour_semaine == 1) { + $ferie = true; + } + } } } //print "ferie=".$ferie."\n"; From 558de4424cf86427e060a0c385a13b67eb12f608 Mon Sep 17 00:00:00 2001 From: Dolibot Date: Thu, 6 Mar 2025 12:06:49 +0000 Subject: [PATCH 3/5] PHPStan > Update baseline --- dev/build/phpstan/phpstan-baseline.neon | 586 +----------------------- 1 file changed, 5 insertions(+), 581 deletions(-) diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 1bb49a384e7..4a889b55066 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -2022,12 +2022,6 @@ parameters: count: 1 path: ../../../htdocs/api/class/api.class.php - - - message: '#^Property DolibarrApiAccess\:\:\$requires type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/api/class/api_access.class.php - - message: '#^Call to function is_object\(\) with ActionComm\|Adherent\|Commande\|CommandeFournisseur\|Contact\|Contrat\|ExpenseReport\|Facture\|FactureFournisseur\|Fichinter\|Mo\|Product\|Project\|Propal\|Task will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -3084,42 +3078,6 @@ parameters: count: 1 path: ../../../htdocs/categories/card.php - - - message: '#^Method Categories\:\:getListForObject\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/categories/class/api_categories.class.php - - - - message: '#^Method Categories\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/categories/class/api_categories.class.php - - - - message: '#^Method Categories\:\:linkObjectById\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/categories/class/api_categories.class.php - - - - message: '#^Method Categories\:\:linkObjectByRef\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/categories/class/api_categories.class.php - - - - message: '#^Method Categories\:\:unlinkObjectById\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/categories/class/api_categories.class.php - - - - message: '#^Method Categories\:\:unlinkObjectByRef\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/categories/class/api_categories.class.php - - message: '#^Method Categorie\:\:get_full_arbo\(\) should return \-1\|array\ but returns array\\.$#' identifier: return.type @@ -3276,12 +3234,6 @@ parameters: count: 2 path: ../../../htdocs/comm/action/class/actioncomm.class.php - - - message: '#^Method AgendaEvents\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/comm/action/class/api_agendaevents.class.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue @@ -3822,36 +3774,12 @@ parameters: count: 1 path: ../../../htdocs/comm/propal/card.php - - - message: '#^Method Proposals\:\:getLines\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/comm/propal/class/api_proposals.class.php - - - - message: '#^Method Proposals\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/comm/propal/class/api_proposals.class.php - - - - message: '#^Method Proposals\:\:postContact\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/comm/propal/class/api_proposals.class.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse count: 4 path: ../../../htdocs/comm/propal/class/api_proposals.class.php - - - message: '#^Property Proposals\:\:\$FIELDS type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/comm/propal/class/api_proposals.class.php - - message: '#^Call to function method_exists\(\) with \$this\(Propal\) and ''getLibStatut'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -4164,24 +4092,6 @@ parameters: count: 6 path: ../../../htdocs/commande/card.php - - - message: '#^Method Orders\:\:getLines\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/commande/class/api_orders.class.php - - - - message: '#^Method Orders\:\:getOrderShipments\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/commande/class/api_orders.class.php - - - - message: '#^Method Orders\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/commande/class/api_orders.class.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse @@ -4194,12 +4104,6 @@ parameters: count: 1 path: ../../../htdocs/commande/class/api_orders.class.php - - - message: '#^Property Orders\:\:\$FIELDS type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/commande/class/api_orders.class.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -4578,24 +4482,6 @@ parameters: count: 2 path: ../../../htdocs/compta/bank/class/account.class.php - - - message: '#^Method BankAccounts\:\:getLines\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/compta/bank/class/api_bankaccounts.class.php - - - - message: '#^Method BankAccounts\:\:getLinks\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/compta/bank/class/api_bankaccounts.class.php - - - - message: '#^Method BankAccounts\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/compta/bank/class/api_bankaccounts.class.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -5040,54 +4926,18 @@ parameters: count: 1 path: ../../../htdocs/compta/facture/card.php - - - message: '#^Method Invoices\:\:getLines\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/compta/facture/class/api_invoices.class.php - - - - message: '#^Method Invoices\:\:getPayments\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/compta/facture/class/api_invoices.class.php - - - - message: '#^Method Invoices\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/compta/facture/class/api_invoices.class.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse count: 5 path: ../../../htdocs/compta/facture/class/api_invoices.class.php - - - message: '#^Property Invoices\:\:\$FIELDS type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/compta/facture/class/api_invoices.class.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue count: 3 path: ../../../htdocs/compta/facture/class/facture-rec.class.php - - - message: '#^Parameter \#1 \$vatrate of function getLocalTaxesFromRate expects int\|string, float given\.$#' - identifier: argument.type - count: 1 - path: ../../../htdocs/compta/facture/class/facture-rec.class.php - - - - message: '#^Parameter \#17 \$fk_unit of method FactureRec\:\:addline\(\) expects string\|null, int\|null given\.$#' - identifier: argument.type - count: 1 - path: ../../../htdocs/compta/facture/class/facture-rec.class.php - - message: '#^Property CommonObject\:\:\$array_options \(array\\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -6942,24 +6792,6 @@ parameters: count: 1 path: ../../../htdocs/contrat/card.php - - - message: '#^Method Contracts\:\:getLines\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/contrat/class/api_contracts.class.php - - - - message: '#^Method Contracts\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/contrat/class/api_contracts.class.php - - - - message: '#^Property Contracts\:\:\$FIELDS type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/contrat/class/api_contracts.class.php - - message: '#^Call to function method_exists\(\) with \$this\(Contrat\) and ''getLibStatut'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -7482,12 +7314,6 @@ parameters: count: 6 path: ../../../htdocs/core/actions_sendmails.inc.php - - - message: '#^Variable \$id might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/actions_sendmails.inc.php - - message: '#^Variable \$result might not be defined\.$#' identifier: variable.undefined @@ -7500,12 +7326,6 @@ parameters: count: 6 path: ../../../htdocs/core/actions_sendmails.inc.php - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 7 - path: ../../../htdocs/core/actions_sendmails.inc.php - - message: '#^Call to function is_array\(\) with array\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -9894,12 +9714,6 @@ parameters: count: 1 path: ../../../htdocs/core/class/utils.class.php - - - message: '#^PHPDoc tag @var with type DoliDB is not subtype of native type mixed\.$#' - identifier: varTag.nativeType - count: 1 - path: ../../../htdocs/core/class/utils.class.php - - message: '#^Result of && is always false\.$#' identifier: booleanAnd.alwaysFalse @@ -14304,24 +14118,12 @@ parameters: count: 1 path: ../../../htdocs/document.php - - - message: '#^Method Donations\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/don/class/api_donations.class.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse count: 1 path: ../../../htdocs/don/class/api_donations.class.php - - - message: '#^Property Donations\:\:\$FIELDS type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/don/class/api_donations.class.php - - message: '#^Call to function property_exists\(\) with \$this\(Don\) and ''societe'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -14520,12 +14322,6 @@ parameters: count: 4 path: ../../../htdocs/ecm/class/ecmfiles.class.php - - - message: '#^Property EcmFiles\:\:\$extraparams \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 4 - path: ../../../htdocs/ecm/class/ecmfiles.class.php - - message: '#^Property EcmFiles\:\:\$filename \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -15570,12 +15366,6 @@ parameters: count: 2 path: ../../../htdocs/expensereport/class/expensereport.class.php - - - message: '#^Parameter \#1 \$vatrate of function getLocalTaxesFromRate expects int\|string, float given\.$#' - identifier: argument.type - count: 1 - path: ../../../htdocs/expensereport/class/expensereport.class.php - - message: '#^Parameter \#2 \$pu of function calcul_price_total expects float, string given\.$#' identifier: argument.type @@ -16002,36 +15792,12 @@ parameters: count: 1 path: ../../../htdocs/fourn/card.php - - - message: '#^Method SupplierInvoices\:\:getLines\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/fourn/class/api_supplier_invoices.class.php - - - - message: '#^Method SupplierInvoices\:\:getPayments\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/fourn/class/api_supplier_invoices.class.php - - - - message: '#^Method SupplierInvoices\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/fourn/class/api_supplier_invoices.class.php - - message: '#^Parameter \#1 \$object of method SupplierOrders\:\:_cleanObjectDatas\(\) expects object, array\ given\.$#' identifier: argument.type count: 1 path: ../../../htdocs/fourn/class/api_supplier_orders.class.php - - - message: '#^Property SupplierOrders\:\:\$FIELDS type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/fourn/class/api_supplier_orders.class.php - - message: '#^Variable \$contact might not be defined\.$#' identifier: variable.undefined @@ -16224,12 +15990,6 @@ parameters: count: 2 path: ../../../htdocs/fourn/class/fournisseur.facture-rec.class.php - - - message: '#^Parameter \#1 \$vatrate of function getLocalTaxesFromRate expects int\|string, float given\.$#' - identifier: argument.type - count: 1 - path: ../../../htdocs/fourn/class/fournisseur.facture-rec.class.php - - message: '#^Parameter \#10 \$txlocaltax1 of method FactureFournisseurRec\:\:addline\(\) expects int, float given\.$#' identifier: argument.type @@ -18306,12 +18066,6 @@ parameters: count: 3 path: ../../../htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php - - - message: '#^Method KnowledgeManagement\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php - - message: '#^Result of && is always false\.$#' identifier: booleanAnd.alwaysFalse @@ -19662,12 +19416,6 @@ parameters: count: 1 path: ../../../htdocs/mrp/tpl/linkedobjectblock.tpl.php - - - message: '#^Method MultiCurrencies\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/multicurrency/class/api_multicurrencies.class.php - - message: '#^Parameter \#1 \$object of method MultiCurrencies\:\:_cleanObjectDatasRate\(\) expects MultiCurrency, CurrencyRate given\.$#' identifier: argument.type @@ -19794,12 +19542,6 @@ parameters: count: 3 path: ../../../htdocs/partnership/class/api_partnerships.class.php - - - message: '#^Method Partnerships\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/partnership/class/api_partnerships.class.php - - message: '#^Result of && is always false\.$#' identifier: booleanAnd.alwaysFalse @@ -20130,90 +19872,12 @@ parameters: count: 1 path: ../../../htdocs/product/class/api_products.class.php - - - message: '#^Method Products\:\:getAttributeValueById\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/class/api_products.class.php - - - - message: '#^Method Products\:\:getAttributeValueByRef\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/class/api_products.class.php - - - - message: '#^Method Products\:\:getAttributeValues\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/class/api_products.class.php - - - - message: '#^Method Products\:\:getAttributeValuesByRef\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/class/api_products.class.php - - - - message: '#^Method Products\:\:getAttributes\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/class/api_products.class.php - - - - message: '#^Method Products\:\:getAttributesByRef\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/class/api_products.class.php - - - - message: '#^Method Products\:\:getAttributesByRefExt\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/class/api_products.class.php - - message: '#^Method Products\:\:getPurchasePrices\(\) should return array\ but returns object\.$#' identifier: return.type count: 1 path: ../../../htdocs/product/class/api_products.class.php - - - message: '#^Unable to resolve the template type T in call to method Products\:\:_cleanObjectDatas\(\)$#' - identifier: argument.templateType - count: 1 - path: ../../../htdocs/product/class/api_products.class.php - - - - message: '#^Method Products\:\:getSubproducts\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/class/api_products.class.php - - - - message: '#^Method Products\:\:getSupplierProducts\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/class/api_products.class.php - - - - message: '#^Method Products\:\:getVariants\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/class/api_products.class.php - - - - message: '#^Method Products\:\:getVariantsByProdRef\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/class/api_products.class.php - - - - message: '#^Method Products\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/class/api_products.class.php - - message: '#^Parameter \#1 \$object of method Products\:\:_cleanObjectDatas\(\) expects object, array\\|int given\.$#' identifier: argument.type @@ -20221,8 +19885,8 @@ parameters: path: ../../../htdocs/product/class/api_products.class.php - - message: '#^Property Products\:\:\$FIELDS type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Unable to resolve the template type T in call to method Products\:\:_cleanObjectDatas\(\)$#' + identifier: argument.templateType count: 1 path: ../../../htdocs/product/class/api_products.class.php @@ -21012,30 +20676,6 @@ parameters: count: 1 path: ../../../htdocs/product/stats/supplier_proposal.php - - - message: '#^Method StockMovements\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/stock/class/api_stockmovements.class.php - - - - message: '#^Property StockMovements\:\:\$FIELDS type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/stock/class/api_stockmovements.class.php - - - - message: '#^Method Warehouses\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/stock/class/api_warehouses.class.php - - - - message: '#^Property Warehouses\:\:\$FIELDS type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/stock/class/api_warehouses.class.php - - message: '#^Call to function method_exists\(\) with \$this\(Entrepot\) and ''getLibStatut'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -21763,29 +21403,11 @@ parameters: path: ../../../htdocs/projet/class/api_projects.class.php - - message: '#^Method Tasks\:\:getRoles\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/projet/class/api_tasks.class.php - - - - message: '#^Method Tasks\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/projet/class/api_tasks.class.php - - - - message: '#^Method Tasks\:\:getRoles\(\) should return array but returns list\\.$#' + message: '#^Method Tasks\:\:getRoles\(\) should return array\ but returns list\\.$#' identifier: return.type count: 1 path: ../../../htdocs/projet/class/api_tasks.class.php - - - message: '#^Unable to resolve the template type T in call to method Tasks\:\:_cleanObjectDatas\(\)$#' - identifier: argument.templateType - count: 1 - path: ../../../htdocs/projet/class/api_tasks.class.php - - message: '#^Parameter \#1 \$object of method Tasks\:\:_cleanObjectDatas\(\) expects object, string given\.$#' identifier: argument.type @@ -21793,14 +21415,8 @@ parameters: path: ../../../htdocs/projet/class/api_tasks.class.php - - message: '#^Parameter \#1 \$string of function dol_stringtotime expects string, DateTime given\.$#' - identifier: argument.type - count: 2 - path: ../../../htdocs/projet/class/api_tasks.class.php - - - - message: '#^Property Tasks\:\:\$FIELDS type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Unable to resolve the template type T in call to method Tasks\:\:_cleanObjectDatas\(\)$#' + identifier: argument.templateType count: 1 path: ../../../htdocs/projet/class/api_tasks.class.php @@ -22896,12 +22512,6 @@ parameters: count: 1 path: ../../../htdocs/public/payment/paymentko.php - - - message: '#^Call to function is_object\(\) with stdClass will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/public/payment/paymentko.php - - message: '#^Call to function is_scalar\(\) with \(int\|string\) will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -22914,12 +22524,6 @@ parameters: count: 1 path: ../../../htdocs/public/payment/paymentko.php - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/public/payment/paymentko.php - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -24036,30 +23640,12 @@ parameters: count: 1 path: ../../../htdocs/recruitment/class/recruitmentcandidature.class.php - - - message: '#^Call to function property_exists\(\) with RecruitmentCandidature and ''date_creation'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/recruitment/class/recruitmentcandidature.class.php - - - - message: '#^Call to function property_exists\(\) with RecruitmentCandidature and ''date_modification'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/recruitment/class/recruitmentcandidature.class.php - - message: '#^Call to function property_exists\(\) with RecruitmentCandidature and ''ref'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 1 path: ../../../htdocs/recruitment/class/recruitmentcandidature.class.php - - - message: '#^Call to function property_exists\(\) with RecruitmentCandidature and ''status'' will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: ../../../htdocs/recruitment/class/recruitmentcandidature.class.php - - message: '#^Left side of && is always false\.$#' identifier: booleanAnd.leftAlwaysFalse @@ -24468,30 +24054,6 @@ parameters: count: 1 path: ../../../htdocs/salaries/card.php - - - message: '#^Method Salaries\:\:getAllPayments\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/salaries/class/api_salaries.class.php - - - - message: '#^Method Salaries\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/salaries/class/api_salaries.class.php - - - - message: '#^Property Salaries\:\:\$FIELDS type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/salaries/class/api_salaries.class.php - - - - message: '#^Property Salaries\:\:\$FIELDSPAYMENT has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/salaries/class/api_salaries.class.php - - message: '#^Call to function method_exists\(\) with \$this\(PaymentSalary\) and ''getNomUrl'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -24840,78 +24402,6 @@ parameters: count: 1 path: ../../../htdocs/societe/class/api_thirdparties.class.php - - - message: '#^Method Thirdparties\:\:generateBankAccountDocument\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/societe/class/api_thirdparties.class.php - - - - message: '#^Method Thirdparties\:\:getCategories\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/societe/class/api_thirdparties.class.php - - - - message: '#^Method Thirdparties\:\:getCompanyBankAccount\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/societe/class/api_thirdparties.class.php - - - - message: '#^Method Thirdparties\:\:getCompanyNotification\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/societe/class/api_thirdparties.class.php - - - - message: '#^Method Thirdparties\:\:getFixedAmountDiscounts\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/societe/class/api_thirdparties.class.php - - - - message: '#^Method Thirdparties\:\:getInvoicesQualifiedForCreditNote\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/societe/class/api_thirdparties.class.php - - - - message: '#^Method Thirdparties\:\:getInvoicesQualifiedForReplacement\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/societe/class/api_thirdparties.class.php - - - - message: '#^Method Thirdparties\:\:getOutStandingInvoices\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/societe/class/api_thirdparties.class.php - - - - message: '#^Method Thirdparties\:\:getOutStandingOrder\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/societe/class/api_thirdparties.class.php - - - - message: '#^Method Thirdparties\:\:getOutStandingProposals\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/societe/class/api_thirdparties.class.php - - - - message: '#^Method Thirdparties\:\:getSalesRepresentatives\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/societe/class/api_thirdparties.class.php - - - - message: '#^Method Thirdparties\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/societe/class/api_thirdparties.class.php - - message: '#^Property Societe\:\:\$default_lang \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -24924,12 +24414,6 @@ parameters: count: 2 path: ../../../htdocs/societe/class/api_thirdparties.class.php - - - message: '#^Property Thirdparties\:\:\$FIELDS type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/societe/class/api_thirdparties.class.php - - message: '#^Variable \$newlang in empty\(\) always exists and is always falsy\.$#' identifier: empty.variable @@ -24972,12 +24456,6 @@ parameters: count: 1 path: ../../../htdocs/societe/class/societe.class.php - - - message: '#^Method Societe\:\:getSalesRepresentatives\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/societe/class/societe.class.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -25326,18 +24804,6 @@ parameters: count: 4 path: ../../../htdocs/supplier_proposal/card.php - - - message: '#^Method SupplierProposals\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/supplier_proposal/class/api_supplier_proposals.class.php - - - - message: '#^Property SupplierProposals\:\:\$FIELDS type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/supplier_proposal/class/api_supplier_proposals.class.php - - message: '#^Call to function method_exists\(\) with \$this\(SupplierProposal\) and ''getLibStatut'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -25752,24 +25218,6 @@ parameters: count: 1 path: ../../../htdocs/ticket/card.php - - - message: '#^Method Tickets\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/ticket/class/api_tickets.class.php - - - - message: '#^Property Tickets\:\:\$FIELDS type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/ticket/class/api_tickets.class.php - - - - message: '#^Property Tickets\:\:\$FIELDS_MESSAGES type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/ticket/class/api_tickets.class.php - - message: '#^Call to function property_exists\(\) with CTicketCategory and ''date_creation'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -26544,24 +25992,6 @@ parameters: count: 1 path: ../../../htdocs/viewimage.php - - - message: '#^Method Webhook\:\:index\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/webhook/class/api_webhook.class.php - - - - message: '#^Method Webhook\:\:listOfTriggers\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/webhook/class/api_webhook.class.php - - - - message: '#^Property Webhook\:\:\$FIELDS type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/webhook/class/api_webhook.class.php - - message: '#^Call to function property_exists\(\) with Target and ''date_creation'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -27192,12 +26622,6 @@ parameters: count: 3 path: ../../../htdocs/zapier/class/api_zapier.class.php - - - message: '#^Property Zapier\:\:\$FIELDS type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/zapier/class/api_zapier.class.php - - message: '#^Result of && is always false\.$#' identifier: booleanAnd.alwaysFalse From 524ef969e8e38b2e92ad006375de72972f2e4f98 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Mar 2025 13:12:10 +0100 Subject: [PATCH 4/5] Update date.lib.php --- htdocs/core/lib/date.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 02e33450c72..c217f41dca5 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -979,7 +979,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $country_code = '', $jour_julien = unixtojd($timestampStart); $jour_semaine = jddayofweek($jour_julien, 0); //Monday (1), Friday (5), Saturday (6) and Sunday (0) - if ($includefriday) { + if ($includefriday) { if ($jour_semaine == 5) { $ferie = true; } From 201424d1195fec637947dbfd178592b03368f9d3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Mar 2025 13:12:34 +0100 Subject: [PATCH 5/5] Update date.lib.php --- htdocs/core/lib/date.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index c217f41dca5..004a144fd64 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -984,7 +984,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $country_code = '', $ferie = true; } } - if ($includesaturday) { + if ($includesaturday) { if ($jour_semaine == 6) { $ferie = true; }