From 25e761bfa5cd801e4a3b2100ba20d185cdbe83cc Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Thu, 4 Sep 2025 14:08:11 +0200 Subject: [PATCH 1/4] Avoid phpstan error --- htdocs/comm/mailing/cibles.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 4b1056238c2..1c1cd8eb9af 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -192,7 +192,7 @@ if (GETPOSTINT('clearlist') && $permissiontocreate) { */ } -if (GETPOSTINT('exportcsv') && $permissiontoread) { +if (GETPOSTINT('exportcsv') && $permissiontoread) { // @phpstan-ignore-line $completefilename = 'targets_emailing'.$object->id.'_'.dol_print_date(dol_now(), 'dayhourlog').'.csv'; header('Content-Type: text/csv'); header('Content-Disposition: attachment;filename='.$completefilename); From 83f27af4c76e2ea203ad868135cbc503603bde27 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Thu, 4 Sep 2025 14:19:56 +0200 Subject: [PATCH 2/4] Fix CI --- htdocs/core/class/commoninvoice.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 909125cc766..fc85474bf05 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -81,7 +81,7 @@ abstract class CommonInvoice extends CommonObject public $date_lim_reglement; /** - * @var int + * @var ?int */ public $cond_reglement_id; // Id in llx_c_paiement /** @@ -98,7 +98,7 @@ abstract class CommonInvoice extends CommonObject public $cond_reglement_doc; /** - * @var int + * @var ?int */ public $mode_reglement_id; /** From 9e2e6eea92247dffbe77aab028dd1ef3a91d8ca0 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Thu, 4 Sep 2025 14:35:02 +0200 Subject: [PATCH 3/4] Fix warning --- htdocs/core/lib/geturl.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/geturl.lib.php b/htdocs/core/lib/geturl.lib.php index bbd21393fa6..124922c03f8 100644 --- a/htdocs/core/lib/geturl.lib.php +++ b/htdocs/core/lib/geturl.lib.php @@ -135,7 +135,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = $array_param = null; curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); // HTTP request is 'PUT' if (!is_array($param)) { - parse_str($param, $array_param); + parse_str($param, $array_param); // @phan-suppress-current-line PhanPluginConstantVariableNull } else { dol_syslog("parameter param must be a string", LOG_WARNING); $array_param = $param; @@ -148,7 +148,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = $array_param = null; curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH'); // RFC 5789 if (!is_array($param)) { - parse_str($param, $array_param); + parse_str($param, $array_param); // @phan-suppress-current-line PhanPluginConstantVariableNull } else { dol_syslog("parameter param must be a string", LOG_WARNING); $array_param = $param; From cf536abe2e947777b023d637573e9d7ca6878f61 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Thu, 4 Sep 2025 14:35:44 +0200 Subject: [PATCH 4/4] Fix warning --- htdocs/core/lib/geturl.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/geturl.lib.php b/htdocs/core/lib/geturl.lib.php index f51e72f680f..55a5649dcbb 100644 --- a/htdocs/core/lib/geturl.lib.php +++ b/htdocs/core/lib/geturl.lib.php @@ -152,7 +152,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation = $array_param = null; curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH'); // RFC 5789 if (!is_array($param)) { - parse_str($param, $array_param); + parse_str($param, $array_param); // @phan-suppress-current-line PhanPluginConstantVariableNull } else { dol_syslog("parameter param must be a string", LOG_WARNING); $array_param = $param;