diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index 93eb5524a1d..8c9230d190c 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -65,9 +65,9 @@ $search_version = GETPOST('search_version', 'alpha');
// For dolistore search
$options = array();
$options['per_page'] = 20;
-$options['categorie'] = ((GETPOST('categorie', 'int') ?GETPOST('categorie', 'int') : 0) + 0);
-$options['start'] = ((GETPOST('start', 'int') ?GETPOST('start', 'int') : 0) + 0);
-$options['end'] = ((GETPOST('end', 'int') ?GETPOST('end', 'int') : 0) + 0);
+$options['categorie'] = ((int) (GETPOST('categorie', 'int') ? GETPOST('categorie', 'int') : 0));
+$options['start'] = ((int) (GETPOST('start', 'int') ?GETPOST('start', 'int') : 0));
+$options['end'] = ((int) (GETPOST('end', 'int') ?GETPOST('end', 'int') : 0));
$options['search'] = GETPOST('search_keyword', 'alpha');
$dolistore = new Dolistore(false);
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 8c333775f0e..9c193b90776 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -2530,7 +2530,7 @@ class Form
* 'warehouseclosed' = count products from closed warehouses,
* 'warehouseinternal' = count products from warehouses for internal correct/transfer only
* @param int $status_purchase Purchase status -1=Return all products, 0=Products not on purchase, 1=Products on purchase
- * @return array Array of keys for json
+ * @return array|string Array of keys for json
*/
public function select_produits_list($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $filterkey = '', $status = 1, $finished = 2, $outputmode = 0, $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $status_purchase = -1)
{
@@ -2859,10 +2859,13 @@ class Form
if (empty($outputmode)) {
return $out;
}
+
return $outarray;
} else {
dol_print_error($this->db);
}
+
+ return '';
}
/**
@@ -3665,8 +3668,9 @@ class Form
return $outarray;
} else {
dol_print_error($this->db);
- return '';
}
+
+ return '';
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
diff --git a/htdocs/core/class/infobox.class.php b/htdocs/core/class/infobox.class.php
index f3f28abe149..606a6640995 100644
--- a/htdocs/core/class/infobox.class.php
+++ b/htdocs/core/class/infobox.class.php
@@ -118,7 +118,7 @@ class InfoBox
$sql .= " WHERE d.entity IN (0, ".$conf->entity.")";
}
- dol_syslog(get_class()."::listBoxes get default box list for mode=".$mode." userid=".(is_object($user) ? $user->id : '')."", LOG_DEBUG);
+ dol_syslog(get_class()."::listBoxes get default box list for mode=".$mode." userid=".(is_object($user) ? $user->id : ''), LOG_DEBUG);
$resql = $dbs->query($sql);
if ($resql) {
$num = $dbs->num_rows($resql);
diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php
index caeece975f2..9544e11e075 100644
--- a/htdocs/core/class/menubase.class.php
+++ b/htdocs/core/class/menubase.class.php
@@ -647,7 +647,7 @@ class Menubase
$sql .= " ORDER BY m.position, m.rowid";
//print $sql;
- //dol_syslog(get_class($this)."::menuLoad mymainmenu=".$mymainmenu." myleftmenu=".$myleftmenu." type_user=".$type_user." menu_handler=".$menu_handler." tabMenu size=".count($tabMenu)."", LOG_DEBUG);
+ //dol_syslog(get_class($this)."::menuLoad mymainmenu=".$mymainmenu." myleftmenu=".$myleftmenu." type_user=".$type_user." menu_handler=".$menu_handler." tabMenu size=".count($tabMenu), LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$numa = $this->db->num_rows($resql);
diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php
index 2a3a2b805da..bf6d6b08b49 100644
--- a/htdocs/core/class/notify.class.php
+++ b/htdocs/core/class/notify.class.php
@@ -225,7 +225,7 @@ class Notify
$sql .= " AND s.rowid = ".((int) $socid);
}
- dol_syslog(__METHOD__." ".$notifcode.", ".$socid."", LOG_DEBUG);
+ dol_syslog(__METHOD__." ".$notifcode.", ".$socid, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
@@ -263,7 +263,7 @@ class Notify
$sql .= " AND c.rowid = ".((int) $userid);
}
- dol_syslog(__METHOD__." ".$notifcode.", ".$socid."", LOG_DEBUG);
+ dol_syslog(__METHOD__." ".$notifcode.", ".$socid, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
diff --git a/htdocs/core/class/stats.class.php b/htdocs/core/class/stats.class.php
index 990bdaf107e..154b2b2158a 100644
--- a/htdocs/core/class/stats.class.php
+++ b/htdocs/core/class/stats.class.php
@@ -359,7 +359,7 @@ abstract class Stats
// phpcs:enable
$result = array();
- dol_syslog(get_class($this).'::'.__FUNCTION__."", LOG_DEBUG);
+ dol_syslog(get_class($this).'::'.__FUNCTION__, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
@@ -388,7 +388,7 @@ abstract class Stats
// phpcs:enable
$result = array();
- dol_syslog(get_class($this).'::'.__FUNCTION__."", LOG_DEBUG);
+ dol_syslog(get_class($this).'::'.__FUNCTION__, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
@@ -442,7 +442,7 @@ abstract class Stats
$result = array();
$res = array();
- dol_syslog(get_class($this).'::'.__FUNCTION__."", LOG_DEBUG);
+ dol_syslog(get_class($this).'::'.__FUNCTION__, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
@@ -499,7 +499,7 @@ abstract class Stats
$result = array();
$res = array();
- dol_syslog(get_class($this).'::'.__FUNCTION__."", LOG_DEBUG);
+ dol_syslog(get_class($this).'::'.__FUNCTION__, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
@@ -557,7 +557,7 @@ abstract class Stats
$result = array();
$res = array();
- dol_syslog(get_class($this).'::'.__FUNCTION__."", LOG_DEBUG);
+ dol_syslog(get_class($this).'::'.__FUNCTION__, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
@@ -613,7 +613,7 @@ abstract class Stats
$result = array();
- dol_syslog(get_class($this).'::'.__FUNCTION__."", LOG_DEBUG);
+ dol_syslog(get_class($this).'::'.__FUNCTION__, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php
index ea6ab728371..05ed388d41f 100644
--- a/htdocs/core/lib/functions2.lib.php
+++ b/htdocs/core/lib/functions2.lib.php
@@ -1301,7 +1301,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
}
//print $sql.'
';
- dol_syslog("functions2::get_next_value mode=".$mode."", LOG_DEBUG);
+ dol_syslog("functions2::get_next_value mode=".$mode, LOG_DEBUG);
$resql = $db->query($sql);
if ($resql) {
$obj = $db->fetch_object($resql);
@@ -1360,7 +1360,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
$sql .= " AND ".$sqlwhere;
}
- dol_syslog("functions2::get_next_value mode=".$mode."", LOG_DEBUG);
+ dol_syslog("functions2::get_next_value mode=".$mode, LOG_DEBUG);
$resql = $db->query($sql);
if ($resql) {
$obj = $db->fetch_object($resql);
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index 0c628c9d5e8..abdda592d2f 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -1178,7 +1178,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
$mycustomfooterheight = pdfGetHeightForHtmlContent($pdf, dol_htmlentitiesbr($mycustomfooter, 1, 'UTF-8', 0));
$marginwithfooter = $marge_basse + $freetextheight + $mycustomfooterheight;
- $posy = $marginwithfooter + 0;
+ $posy = (float) $marginwithfooter;
// Option for footer background color (without freetext zone)
if (getDolGlobalString('PDF_FOOTER_BACKGROUND_COLOR')) {
@@ -1222,7 +1222,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
} else {
// Else default footer
$marginwithfooter = $marge_basse + $freetextheight + (!empty($line1) ? 3 : 0) + (!empty($line2) ? 3 : 0) + (!empty($line3) ? 3 : 0) + (!empty($line4) ? 3 : 0);
- $posy = $marginwithfooter + 0;
+ $posy = (float) $marginwithfooter;
// Option for footer background color (without freetext zone)
if (getDolGlobalString('PDF_FOOTER_BACKGROUND_COLOR')) {
@@ -1652,7 +1652,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
}
// Show information for lot
- if ($dbatch) {
+ if (!empty($dbatch)) {
// $object is a shipment.
//var_dump($object->lines[$i]->details_entrepot); // array from llx_expeditiondet (we can have seral lines for one fk_origin_line)
//var_dump($object->lines[$i]->detail_batch); // array from llx_expeditiondet_batch (each line with a lot is linked to llx_expeditiondet)
diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php
index f88a05bd12b..7297b17a6b7 100644
--- a/htdocs/core/modules/DolibarrModules.class.php
+++ b/htdocs/core/modules/DolibarrModules.class.php
@@ -461,7 +461,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
// Add current entity id
$sql = str_replace('__ENTITY__', $conf->entity, $sql);
- dol_syslog(get_class($this)."::_init ignoreerror=".$ignoreerror."", LOG_DEBUG);
+ dol_syslog(get_class($this)."::_init ignoreerror=".$ignoreerror, LOG_DEBUG);
$result = $this->db->query($sql, $ignoreerror);
if (!$result) {
if (!$ignoreerror) {
@@ -1327,7 +1327,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
$sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes (box_id, position, box_order, fk_user, entity)";
$sql .= " VALUES (".((int) $lastid).", ".((int) $key2).", '0', 0, ".((int) $conf->entity).")";
- dol_syslog(get_class($this)."::insert_boxes onto page ".$key2."=".$val2."", LOG_DEBUG);
+ dol_syslog(get_class($this)."::insert_boxes onto page ".$key2."=".$val2, LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql) {
$err++;
diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
index 2995321eeb5..e296663f39a 100644
--- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
+++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
@@ -526,7 +526,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$tab_hl = 4;
$posx = $this->marge_gauche;
- $pdf->SetXY($posx, $tab_top + 0);
+ $pdf->SetXY($posx, $tab_top);
$pdf->SetFont('', '', $default_font_size - 2);
@@ -540,7 +540,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$index = 0;
// Total HT
$pdf->SetFillColor(255, 255, 255);
- $pdf->SetXY($posx, $tab_top + 0);
+ $pdf->SetXY($posx, $tab_top);
$pdf->MultiCell($largcol, $tab_hl, $outputlangs->transnoentitiesnoconv("Signature"), 0, 'L', 1);
$pdf->SetXY($posx, $tab_top + $tab_hl);
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index 120d9244988..4bfb6f93413 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -935,11 +935,11 @@ class pdf_einstein extends ModelePDFCommandes
// Total HT
$pdf->SetFillColor(255, 255, 255);
- $pdf->SetXY($col1x, $tab2_top + 0);
+ $pdf->SetXY($col1x, $tab2_top);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1);
$total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
- $pdf->SetXY($col2x, $tab2_top + 0);
+ $pdf->SetXY($col2x, $tab2_top);
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);
// Show VAT by rates and total
diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
index 3d6038f39d8..584795d37e6 100644
--- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
@@ -1150,10 +1150,10 @@ class pdf_eratosthene extends ModelePDFCommandes
// Total HT
$pdf->SetFillColor(255, 255, 255);
- $pdf->SetXY($col1x, $tab2_top + 0);
+ $pdf->SetXY($col1x, $tab2_top);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1);
$total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
- $pdf->SetXY($col2x, $tab2_top + 0);
+ $pdf->SetXY($col2x, $tab2_top);
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);
// Show VAT by rates and total
diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
index ecbaf280047..20504da255c 100644
--- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
@@ -1347,11 +1347,11 @@ class pdf_crabe extends ModelePDFFactures
// Total HT
$pdf->SetFillColor(255, 255, 255);
- $pdf->SetXY($col1x, $tab2_top + 0);
+ $pdf->SetXY($col1x, $tab2_top);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities(empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) ? "TotalHT" : "Total").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities(empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) ? "TotalHT" : "Total") : ''), 0, 'L', 1);
$total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
- $pdf->SetXY($col2x, $tab2_top + 0);
+ $pdf->SetXY($col2x, $tab2_top);
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, $outputlangs), 0, 'R', 1);
// Show VAT by rates and total
diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
index 9200b554d3c..5a206410aa7 100644
--- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
@@ -1640,9 +1640,9 @@ class pdf_sponge extends ModelePDFFactures
// Show total NET before discount
if (!empty($conf->global->MAIN_SHOW_AMOUNT_BEFORE_DISCOUNT)) {
$pdf->SetFillColor(255, 255, 255);
- $pdf->SetXY($col1x, $tab2_top + 0);
+ $pdf->SetXY($col1x, $tab2_top);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHTBeforeDiscount").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHTBeforeDiscount") : ''), 0, 'L', 1);
- $pdf->SetXY($col2x, $tab2_top + 0);
+ $pdf->SetXY($col2x, $tab2_top);
$pdf->MultiCell($largcol2, $tab2_hl, price($total_line_remise + $total_ht, 0, $outputlangs), 0, 'R', 1);
$index++;
diff --git a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
index 784c784f849..1416992e3c5 100644
--- a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
+++ b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php
@@ -816,11 +816,11 @@ class pdf_vinci extends ModelePDFMo
// Total HT
$pdf->SetFillColor(255, 255, 255);
- $pdf->SetXY($col1x, $tab2_top + 0);
+ $pdf->SetXY($col1x, $tab2_top);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
$total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
- $pdf->SetXY($col2x, $tab2_top + 0);
+ $pdf->SetXY($col2x, $tab2_top);
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, 'R', 1);
// Show VAT by rates and total
diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
index 6e89e57e71b..6b16ac1c1b0 100644
--- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
@@ -1119,11 +1119,11 @@ class pdf_azur extends ModelePDFPropales
// Total HT
$pdf->SetFillColor(255, 255, 255);
- $pdf->SetXY($col1x, $tab2_top + 0);
+ $pdf->SetXY($col1x, $tab2_top);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
$total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
- $pdf->SetXY($col2x, $tab2_top + 0);
+ $pdf->SetXY($col2x, $tab2_top);
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);
// Show VAT by rates and total
@@ -1769,7 +1769,7 @@ class pdf_azur extends ModelePDFPropales
$index = 0;
// Total HT
$pdf->SetFillColor(255, 255, 255);
- $pdf->SetXY($posx, $tab_top + 0);
+ $pdf->SetXY($posx, $tab_top);
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->MultiCell($largcol, $tab_hl, $outputlangs->transnoentities("ProposalCustomerSignature"), 0, 'L', 1);
diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
index e0e9e18a031..2cf90351cd0 100644
--- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
@@ -1244,11 +1244,11 @@ class pdf_cyan extends ModelePDFPropales
// Total HT
$pdf->SetFillColor(255, 255, 255);
- $pdf->SetXY($col1x, $tab2_top + 0);
+ $pdf->SetXY($col1x, $tab2_top);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1);
$total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
- $pdf->SetXY($col2x, $tab2_top + 0);
+ $pdf->SetXY($col2x, $tab2_top);
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);
// Show VAT by rates and total
@@ -1854,7 +1854,7 @@ class pdf_cyan extends ModelePDFPropales
$index = 0;
// Total HT
$pdf->SetFillColor(255, 255, 255);
- $pdf->SetXY($posx, $tab_top + 0);
+ $pdf->SetXY($posx, $tab_top);
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->MultiCell($largcol, $tab_hl, $outputlangs->transnoentities("ProposalCustomerSignature"), 0, 'L', 1);
diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php
index a2dbf10b3e9..ed8b46c7746 100644
--- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php
+++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php
@@ -1035,10 +1035,10 @@ class pdf_eagle_proforma extends ModelePDFCommandes
// Total HT
/*$pdf->SetFillColor(255, 255, 255);
- $pdf->SetXY($col1x, $tab2_top + 0);
+ $pdf->SetXY($col1x, $tab2_top);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', 1);
$total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
- $pdf->SetXY($col2x, $tab2_top + 0);
+ $pdf->SetXY($col2x, $tab2_top);
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);*/
// Show VAT by rates and total
diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
index 29231e62966..f81cc03009b 100644
--- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
+++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
@@ -680,11 +680,11 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
// Total HT
$pdf->SetFillColor(255, 255, 255);
- $pdf->SetXY($col1x, $tab2_top + 0);
+ $pdf->SetXY($col1x, $tab2_top);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
$total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
- $pdf->SetXY($col2x, $tab2_top + 0);
+ $pdf->SetXY($col2x, $tab2_top);
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, $outputlangs), 0, 'R', 1);
// Show VAT by rates and total
diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
index aed616ae346..c83863339c2 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
@@ -972,11 +972,11 @@ class pdf_cornas extends ModelePDFSuppliersOrders
// Total HT
$pdf->SetFillColor(255, 255, 255);
- $pdf->SetXY($col1x, $tab2_top + 0);
+ $pdf->SetXY($col1x, $tab2_top);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
$total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
- $pdf->SetXY($col2x, $tab2_top + 0);
+ $pdf->SetXY($col2x, $tab2_top);
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, 'R', 1);
// Show VAT by rates and total
diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
index 6f868d8e09c..5754561c707 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
@@ -853,11 +853,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
// Total HT
$pdf->SetFillColor(255, 255, 255);
- $pdf->SetXY($col1x, $tab2_top + 0);
+ $pdf->SetXY($col1x, $tab2_top);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
$total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
- $pdf->SetXY($col2x, $tab2_top + 0);
+ $pdf->SetXY($col2x, $tab2_top);
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, 'R', 1);
// Show VAT by rates and total
diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
index 693cf8eac67..c844aec2c61 100644
--- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
@@ -925,11 +925,12 @@ class pdf_aurore extends ModelePDFSupplierProposal
// Total HT
$pdf->SetFillColor(255, 255, 255);
- $pdf->SetXY($col1x, $tab2_top + 0);
+ $pdf->SetXY($col1x, $tab2_top);
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
- $pdf->SetXY($col2x, $tab2_top + 0);
- $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);
+ $total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
+ $pdf->SetXY($col2x, $tab2_top);
+ $pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);
// Show VAT by rates and total
$pdf->SetFillColor(248, 248, 248);
diff --git a/htdocs/expedition/class/expeditionlinebatch.class.php b/htdocs/expedition/class/expeditionlinebatch.class.php
index 5d99d1c7a74..ab1d9123830 100644
--- a/htdocs/expedition/class/expeditionlinebatch.class.php
+++ b/htdocs/expedition/class/expeditionlinebatch.class.php
@@ -194,7 +194,7 @@ class ExpeditionLineBatch extends CommonObject
}
$sql .= " WHERE fk_expeditiondet=".(int) $id_line_expdet;
- dol_syslog(__METHOD__."", LOG_DEBUG);
+ dol_syslog(__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 9e8e6391752..bf339d31356 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -1671,7 +1671,7 @@ class Product extends CommonObject
$sql .= "$field = '".$this->db->escape($value)."'";
$sql .= " WHERE rowid = ".((int) $this->id);
- dol_syslog(__METHOD__."", LOG_DEBUG);
+ dol_syslog(__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
diff --git a/htdocs/projet/class/projectstats.class.php b/htdocs/projet/class/projectstats.class.php
index 322277187f7..65d673a9ad2 100644
--- a/htdocs/projet/class/projectstats.class.php
+++ b/htdocs/projet/class/projectstats.class.php
@@ -98,7 +98,7 @@ class ProjectStats extends Stats
$result = array();
- dol_syslog(get_class($this).'::'.__METHOD__."", LOG_DEBUG);
+ dol_syslog(get_class($this).'::'.__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
diff --git a/htdocs/projet/class/taskstats.class.php b/htdocs/projet/class/taskstats.class.php
index c3b3a5b716a..ce7c6c4f4c5 100644
--- a/htdocs/projet/class/taskstats.class.php
+++ b/htdocs/projet/class/taskstats.class.php
@@ -70,7 +70,7 @@ class TaskStats extends Stats
$result = array();
$res = array();
- dol_syslog(get_class($this).'::'.__METHOD__."", LOG_DEBUG);
+ dol_syslog(get_class($this).'::'.__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php
index 43f940acdee..ffe59b01d61 100644
--- a/htdocs/stripe/class/stripe.class.php
+++ b/htdocs/stripe/class/stripe.class.php
@@ -1087,13 +1087,13 @@ class Stripe extends CommonObject
$ipaddress = getUserRemoteIP();
$metadata = array(
- "dol_id" => "".$item."",
- "dol_type" => "".$origin."",
- "dol_thirdparty_id" => "".$societe->id."",
+ "dol_id" => (string) $item,
+ "dol_type" => (string) $origin,
+ "dol_thirdparty_id" => (string) $societe->id,
'dol_thirdparty_name' => $societe->name,
- 'dol_version'=>DOL_VERSION,
- 'dol_entity'=>$conf->entity,
- 'ipaddress'=>$ipaddress
+ 'dol_version' => DOL_VERSION,
+ 'dol_entity' => $conf->entity,
+ 'ipaddress' => $ipaddress
);
$return = new Stripe($this->db);
try {
@@ -1233,7 +1233,7 @@ class Stripe extends CommonObject
$return->message = $charge->source->card->brand." ....".$charge->source->card->last4;
} elseif ($charge->source->type == 'three_d_secure') {
$stripe = new Stripe($this->db);
- $src = \Stripe\Source::retrieve("".$charge->source->three_d_secure->card."", array(
+ $src = \Stripe\Source::retrieve("".$charge->source->three_d_secure->card, array(
"stripe_account" => $stripe->getStripeAccount($service)
));
$return->message = $src->card->brand." ....".$src->card->last4;
diff --git a/htdocs/stripe/payout.php b/htdocs/stripe/payout.php
index 1965c8ab73d..942a913c8ea 100644
--- a/htdocs/stripe/payout.php
+++ b/htdocs/stripe/payout.php
@@ -215,15 +215,15 @@ if (!$rowid) {
// Status
print "