Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2025-07-05 00:14:58 +02:00
commit e7592d6ea9
9 changed files with 15 additions and 63 deletions

View file

@ -9390,54 +9390,6 @@ parameters:
count: 1
path: ../../../htdocs/core/lib/files.lib.php
-
message: '#^Parameter \#1 \$ftp of function ftp_cdup expects FTP\\Connection, resource given\.$#'
identifier: argument.type
count: 1
path: ../../../htdocs/core/lib/ftp.lib.php
-
message: '#^Parameter \#1 \$ftp of function ftp_chdir expects FTP\\Connection, resource given\.$#'
identifier: argument.type
count: 1
path: ../../../htdocs/core/lib/ftp.lib.php
-
message: '#^Parameter \#1 \$ftp of function ftp_close expects FTP\\Connection, resource given\.$#'
identifier: argument.type
count: 1
path: ../../../htdocs/core/lib/ftp.lib.php
-
message: '#^Parameter \#1 \$ftp of function ftp_delete expects FTP\\Connection, resource given\.$#'
identifier: argument.type
count: 1
path: ../../../htdocs/core/lib/ftp.lib.php
-
message: '#^Parameter \#1 \$ftp of function ftp_get expects FTP\\Connection, resource given\.$#'
identifier: argument.type
count: 1
path: ../../../htdocs/core/lib/ftp.lib.php
-
message: '#^Parameter \#1 \$ftp of function ftp_mkdir expects FTP\\Connection, resource given\.$#'
identifier: argument.type
count: 1
path: ../../../htdocs/core/lib/ftp.lib.php
-
message: '#^Parameter \#1 \$ftp of function ftp_put expects FTP\\Connection, resource given\.$#'
identifier: argument.type
count: 1
path: ../../../htdocs/core/lib/ftp.lib.php
-
message: '#^Parameter \#1 \$ftp of function ftp_rmdir expects FTP\\Connection, resource given\.$#'
identifier: argument.type
count: 1
path: ../../../htdocs/core/lib/ftp.lib.php
-
message: '#^Call to function is_array\(\) with array\<string, mixed\> will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
@ -13449,7 +13401,7 @@ parameters:
-
message: '#^Result of && is always false\.$#'
identifier: booleanAnd.alwaysFalse
count: 2
count: 3
path: ../../../htdocs/expensereport/card.php
-

View file

@ -778,8 +778,8 @@ class ExternalModules
}
}
if (!empty($request['response']['curl_error_msg'])) {
$error_message .= ' - ' . $request['response']['curl_error_msg'];
if (!empty($request['curl_error_msg'])) {
$error_message .= ' - ' . $request['curl_error_msg'];
}
// Return the formatted error message

View file

@ -213,7 +213,7 @@ class Facture extends CommonInvoice
public $situation_cycle_ref;
/**
* @var int Situation counter inside the cycle
* @var ?int Situation counter inside the cycle
*/
public $situation_counter;

View file

@ -1293,7 +1293,7 @@ class Conf extends stdClass
$this->global->MAIN_MODULE_DOLISTORE_API_SRV = 'https://www.dolistore.com/api/';
}
if (empty($this->global->MAIN_MODULE_DOLISTORE_API_KEY)) {
$this->global->MAIN_MODULE_DOLISTORE_API_KEY = 'dolistorecatalogpublickey1234567';
$this->global->MAIN_MODULE_DOLISTORE_API_KEY = 'dolistorepublicapi';
}
// Enable by default the CSRF protection by token.

View file

@ -178,7 +178,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation =
do {
if ($maxRedirection < 1) {
break;
return array('http_code' => 400, 'content' => 'Maximum number of redirections reached', 'curl_error_no' => 1, 'curl_error_msg' => 'Maximum number of redirections reached');
}
curl_setopt($ch, CURLOPT_URL, $newUrl);
@ -192,7 +192,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation =
if (in_array($hosttocheck, array('metadata.google.internal'))) {
$info['http_code'] = 400;
$info['content'] = 'Error bad hostname '.$hosttocheck.' (Used by Google metadata). This value for hostname is not allowed.';
break;
return array('http_code' => 400, 'content' => $info['content'], 'curl_error_no' => 1, 'curl_error_msg' => $info['content']);
}
// Clean host name $hosttocheck to convert it into an IP $iptocheck
@ -220,7 +220,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation =
if ($tmpresult) {
$info['http_code'] = 400;
$info['content'] = $tmpresult;
break;
return array('http_code' => 400, 'content' => $tmpresult, 'curl_error_no' => 1, 'curl_error_msg' => $tmpresult);
}
}

View file

@ -213,7 +213,7 @@ if (empty($reshook)) {
setEventMessages($object->error, $object->errors, 'errors');
}
$result = $object->setValueFrom('ref_customer', GETPOST('ref_customer', 'alpha'), '', null, 'text', '', $user, 'SHIPMENT_MODIFY');
$result = $object->setValueFrom('ref_customer', GETPOST('ref_customer', 'alpha'), '', null, 'text', '', $user, 'SHIPPING_MODIFY');
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
$action = 'editref_customer';
@ -236,7 +236,7 @@ if (empty($reshook)) {
if (!$error) {
// Actions on extra fields
$result = $object->updateExtraField($attribute_name, 'SHIPMENT_MODIFY');
$result = $object->updateExtraField($attribute_name, 'SHIPPING_MODIFY');
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
$error++;

View file

@ -209,7 +209,7 @@ if (empty($reshook)) {
}
if (!$error) {
$result = $object->updateExtraField($attribute_name, 'SHIPMENT_MODIFY');
$result = $object->updateExtraField($attribute_name, 'SHIPPING_MODIFY');
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
$error++;

View file

@ -1259,7 +1259,7 @@ if (empty($reshook)) {
$newlang = $tmpuser->lang;
}
if (empty($newlang)) {
$newlang = $langs;
$newlang = $langs->defaultlang;
}
if (!empty($newlang)) {
$outputlangs = new Translate("", $conf);
@ -2089,7 +2089,7 @@ if ($action == 'create') {
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("AmountExpected").':</td><td class="right">'.price($object->total_ttc).'</td><td></td></tr>';
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("RemainderToPay").':</td>';
print '<td class="right'.(($resteapayeraffiche && empty($cssforamountpaymentcomplete)) ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'.price($resteapayeraffiche).'</td><td></td></tr>';
print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : (' '.$cssforamountpaymentcomplete)).'">'.price($resteapayeraffiche).'</td><td></td></tr>';
$db->free($resql);
} else {

View file

@ -1449,8 +1449,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
// Prospect/Customer/Supplier
$selected = $object->client;
$selectedcustomer = 0;
$selectedprospect = 0;
$selectedcustomer = (getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')==1 || getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')==3 ? 1 : 0);
$selectedprospect = (getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')==2 || getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')==3 ? 1 : 0);
switch ($selected) {
case 1:
$selectedcustomer = 1;