Replace var_export by formatLogObject (continued) (#37188)

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
hansemschnokeloch
2026-02-10 16:54:51 +01:00
committed by GitHub
parent 448bd21195
commit 019e17c040
5 changed files with 8 additions and 8 deletions

View File

@@ -1654,7 +1654,7 @@ abstract class CommonInvoice extends CommonObject
$charge->customer = $customer->id;
} elseif ($paymentintent->status === 'requires_action') {
//paymentintent->status may be => 'requires_action' (no error in such a case)
dol_syslog(var_export($paymentintent, true), LOG_DEBUG);
dol_syslog(formatLogObject($paymentintent), LOG_DEBUG);
$charge->status = 'failed';
$charge->customer = $customer->id;
@@ -1665,7 +1665,7 @@ abstract class CommonInvoice extends CommonObject
$stripefailuremessage = 'Action required. Contact the support at ';// . $conf->global->SELLYOURSAAS_MAIN_EMAIL;
$stripefailuredeclinecode = $stripe->declinecode;
} else {
dol_syslog(var_export($paymentintent, true), LOG_DEBUG);
dol_syslog(formatLogObject($paymentintent), LOG_DEBUG);
$charge->status = 'failed';
$charge->customer = $customer->id;

View File

@@ -3084,7 +3084,7 @@ abstract class CommonObject
*/
public function setPaymentTerms($id, $deposit_percent = null)
{
dol_syslog(get_class($this).'::setPaymentTerms('.$id.', '.var_export($deposit_percent, true).')');
dol_syslog(get_class($this).'::setPaymentTerms('.$id.', '.formatLogObject($deposit_percent).')');
if ($this->status >= 0 || $this->element == 'societe') {
// TODO uniformize field name
$fieldname = 'fk_cond_reglement';

View File

@@ -1019,7 +1019,7 @@ IMG;
}
} else {
dol_syslog(get_class($this).'::exportAsAttachedPDF $ret_val='.$retval, LOG_DEBUG);
dol_syslog(get_class($this).'::exportAsAttachedPDF $output_arr='.var_export($output_arr, true), LOG_DEBUG);
dol_syslog(get_class($this).'::exportAsAttachedPDF $output_arr='.formatLogObject($output_arr), LOG_DEBUG);
if ($retval == 126) {
throw new OdfException('Permission execute convert script : ' . $command);

View File

@@ -573,8 +573,8 @@ if ($action == 'charge' && isModEnabled('stripe')) { // Test on permission not r
}
dol_syslog("newpayment.php execute action = ".$action." STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION=".getDolGlobalInt('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION'), LOG_DEBUG, 0, '_payment');
dol_syslog("GET=".var_export($_GET, true), LOG_DEBUG, 0, '_payment');
dol_syslog("POST=".var_export($_POST, true), LOG_DEBUG, 0, '_payment');
dol_syslog("GET=".formatLogObject($_GET), LOG_DEBUG, 0, '_payment');
dol_syslog("POST=".formatLogObject($_POST), LOG_DEBUG, 0, '_payment');
$stripeToken = GETPOST("stripeToken", 'alpha');
$email = GETPOST("email", 'alpha');
@@ -756,7 +756,7 @@ if ($action == 'charge' && isModEnabled('stripe')) { // Test on permission not r
print('Message is:'.$err['message']."\n");
$error++;
$errormessage = "ErrorCard ".$e->getMessage()." err=".var_export($err, true);
$errormessage = "ErrorCard ".$e->getMessage()." err=".formatLogObject($err);
dol_syslog($errormessage, LOG_WARNING, 0, '_payment');
setEventMessages($e->getMessage(), null, 'errors');
$action = '';

View File

@@ -524,7 +524,7 @@ $fulltag = $FULLTAG;
$tmptag = dolExplodeIntoArray($fulltag, '.', '=');
dol_syslog("ispaymentok=".$ispaymentok." tmptag=".var_export($tmptag, true), LOG_DEBUG, 0, '_payment');
dol_syslog("ispaymentok=".$ispaymentok." tmptag=".formatLogObject($tmptag), LOG_DEBUG, 0, '_payment');
// Set $appli for emails title