diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 12303ed2b1d..5dee9316b1e 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -5648,7 +5648,7 @@ class Form
* @param string $title Title
* @param string $question Question
* @param string $action Action
- * @param array}>|string|null $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>'autofocus' or 'style=...'))
+ * @param array}>|string|null $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>'autofocus' or 'style=...'))
* 'type' can be 'text', 'password', 'checkbox', 'radio', 'date', 'datetime', 'select', 'multiselect', 'morecss',
* 'other', 'onecolumn' or 'hidden'...
* @param int<0,1>|''|'no'|'yes'|'1'|'0' $selectedchoice '' or 'no', or 'yes' or '1', 1, '0' or 0
diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php
index b9be63dee34..11eca55e4b6 100644
--- a/htdocs/core/class/html.formcontract.class.php
+++ b/htdocs/core/class/html.formcontract.class.php
@@ -1,5 +1,6 @@
+ * Copyright (C) 2025 MDW
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -180,17 +181,17 @@ class FormContract
/**
* Show a form to select a contract
*
- * @param int $page Page
+ * @param string $page Page
* @param int $socid Id third party (-1=all, 0=only contracts not linked to a third party, id=contracts not linked or linked to third party id)
* @param int $selected Id contract preselected
* @param string $htmlname Nom de la zone html
* @param int $maxlength Maximum length of label
* @param int $showempty Show empty line
* @param int $showRef Show customer and supplier reference on each contract (when found)
- * @param int $noouput 1=Return the output instead of display
+ * @param int<0,1> $nooutput 1=Return the output instead of display
* @return string|void html string
*/
- public function formSelectContract($page, $socid = -1, $selected = 0, $htmlname = 'contrattid', $maxlength = 16, $showempty = 1, $showRef = 0, $noouput = 0)
+ public function formSelectContract($page, $socid = -1, $selected = 0, $htmlname = 'contrattid', $maxlength = 16, $showempty = 1, $showRef = 0, $nooutput = 0)
{
global $langs;
@@ -201,7 +202,7 @@ class FormContract
$ret .= '';
$ret .= '';
- if ($noouput) {
+ if ($nooutput) {
return $ret;
}
diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php
index 11df59e893a..ec5ff384592 100644
--- a/htdocs/core/lib/price.lib.php
+++ b/htdocs/core/lib/price.lib.php
@@ -48,7 +48,7 @@
* @param string $price_base_type 'HT'=Unit price parameter $pu is HT, 'TTC'=Unit price parameter $pu is TTC (HT+VAT but not Localtax. TODO Add also mode 'INCT' when pu is price HT+VAT+LT1+LT2)
* @param int $info_bits Miscellaneous information on line
* @param int<0,1> $type 0/1=Product/service
- * @param string|Societe|string $seller Third party seller (we need $seller->country_id property). Provided only if seller is the supplier, otherwise $seller will be $mysoc.
+ * @param string|Societe|null $seller Third party seller (we need $seller->country_id property). Provided only if seller is the supplier, otherwise $seller will be $mysoc.
* @param array{0:string,1:int|string,2:string,3:string}|array{0:string,1:int|string,2:string,3:int|string,4:string,5:string} $localtaxes_array Array with localtaxes info array('0'=>type1,'1'=>rate1,'2'=>type2,'3'=>rate2) (loaded by getLocalTaxesFromRate(vatrate, 0, ...) function).
* @param float $progress Situation invoices progress (value from 0 to 100, 100 by default)
* @param float $multicurrency_tx Currency rate (1 by default)
@@ -87,7 +87,7 @@
*
* @phan-suppress PhanTypeMismatchDefault
*/
-function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocaltax1_rate, $uselocaltax2_rate, $remise_percent_global, $price_base_type, $info_bits, $type, $seller = '', $localtaxes_array = [], $progress = 100, $multicurrency_tx = 1, $pu_devise = 0, $multicurrency_code = '') // @phpstan-ignore-line
+function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocaltax1_rate, $uselocaltax2_rate, $remise_percent_global, $price_base_type, $info_bits, $type, $seller = null, $localtaxes_array = [], $progress = 100, $multicurrency_tx = 1, $pu_devise = 0, $multicurrency_code = '') // @phpstan-ignore-line
{
global $conf, $mysoc, $db;
diff --git a/htdocs/eventorganization/conferenceorbooth_card.php b/htdocs/eventorganization/conferenceorbooth_card.php
index ff6d66b04f3..2a35ceb8dfb 100644
--- a/htdocs/eventorganization/conferenceorbooth_card.php
+++ b/htdocs/eventorganization/conferenceorbooth_card.php
@@ -365,13 +365,13 @@ if (!empty($withproject)) {
print '
';
$disable_delete = 0;
+$title_button = '';
// Bank account
if (isModEnabled("bank")) {
if ($object->bank_account) {
diff --git a/htdocs/expensereport/payment/info.php b/htdocs/expensereport/payment/info.php
index cb83c850443..5b6fa16191c 100644
--- a/htdocs/expensereport/payment/info.php
+++ b/htdocs/expensereport/payment/info.php
@@ -4,6 +4,7 @@
* Copyright (C) 2013 Marcos García
* Copyright (C) 2015 Alexandre Spangaro
* Copyright (C) 2024 Frédéric France
+ * Copyright (C) 2025 MDW
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -42,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php';
// Load translation files required by the page
$langs->loadLangs(array('bills', 'trips'));
-$id = GETPOST('id');
+$id = GETPOSTINT('id');
$ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'aZ09');
$confirm = GETPOST('confirm', 'alpha');
diff --git a/htdocs/expensereport/payment/payment.php b/htdocs/expensereport/payment/payment.php
index 2c69d7af7c9..b0045757bab 100644
--- a/htdocs/expensereport/payment/payment.php
+++ b/htdocs/expensereport/payment/payment.php
@@ -2,7 +2,7 @@
/* Copyright (C) 2015 Alexandre Spangaro
* Copyright (C) 2015 Laurent Destailleur
* Copyright (C) 2018-2024 Frédéric France
- * Copyright (C) 2024 MDW
+ * Copyright (C) 2024-2025 MDW
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -225,6 +225,7 @@ if ($action == 'create' || empty($action)) {
$sql .= " FROM ".MAIN_DB_PREFIX."payment_expensereport as p, ".MAIN_DB_PREFIX."expensereport as e";
$sql .= " WHERE p.fk_expensereport = e.rowid AND p.fk_expensereport = ".((int) $id);
$sql .= ' AND e.entity IN ('.getEntity('expensereport').')';
+ $sumpaid = 0;
$resql = $db->query($sql);
if ($resql) {
$obj = $db->fetch_object($resql);
diff --git a/htdocs/expensereport/stats/index.php b/htdocs/expensereport/stats/index.php
index 0ddaee0be92..e5bb55b9438 100644
--- a/htdocs/expensereport/stats/index.php
+++ b/htdocs/expensereport/stats/index.php
@@ -2,8 +2,8 @@
/* Copyright (C) 2003-2006 Rodolphe Quiedeville
* Copyright (c) 2004-2012 Laurent Destailleur
* Copyright (C) 2012 Marcos García
- * Copyright (C) 2018-2024 Frédéric France
- * Copyright (C) 2024 MDW
+ * Copyright (C) 2018-2024 Frédéric France
+ * Copyright (C) 2024-2025 MDW
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -159,6 +159,7 @@ if (!$mesg) {
$data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);
+$fileurl_avg = null;
if (!$user->hasRight('societe', 'client', 'voir')) {
$filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png';
if ($mode == 'customer') {
@@ -179,7 +180,7 @@ if (!$user->hasRight('societe', 'client', 'voir')) {
$px3 = new DolGraph();
$mesg = $px3->isGraphKo();
-if (!$mesg) {
+if (!$mesg && $fileurl_avg !== null) {
$px3->SetData($data);
$i = $startyear;
$legend = array();
@@ -190,7 +191,7 @@ if (!$mesg) {
$px3->SetLegend($legend);
$px3->SetYLabel($langs->trans("AmountAverage"));
$px3->SetMaxValue($px3->GetCeilMaxValue());
- $px3->SetMinValue($px3->GetFloorMinValue());
+ $px3->SetMinValue((int) $px3->GetFloorMinValue());
$px3->SetWidth($WIDTH);
$px3->SetHeight($HEIGHT);
$px3->SetShading(3);
@@ -248,7 +249,7 @@ if (!$user->hasRight('expensereport', 'readall') && !$user->hasRight('expenserep
$include = 'hierarchy';
}
print img_picto('', 'user', 'class="pictofixedwidth"');
-print $form->select_dolusers($userid, 'userid', 1, '', 0, $include, '', 0, 0, 0, '', 0, '', 'widthcentpercentminusx maxwidth300');
+print $form->select_dolusers($userid, 'userid', 1, null, 0, $include, '', '', 0, 0, '', 0, '', 'widthcentpercentminusx maxwidth300');
print '
';
// Status
print '
'.$langs->trans("Status").'
';
diff --git a/htdocs/expensereport/tpl/expensereport_addfile.tpl.php b/htdocs/expensereport/tpl/expensereport_addfile.tpl.php
index ff2fd3d4285..b0442bd9a10 100644
--- a/htdocs/expensereport/tpl/expensereport_addfile.tpl.php
+++ b/htdocs/expensereport/tpl/expensereport_addfile.tpl.php
@@ -1,4 +1,13 @@
+ */
+
+/**
+ * @var int $colspan
+ */
+'
+@phan-var-force int $colspan
+';
// Add line to upload new file
print ''."\n";
diff --git a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php
index 2e02e7b8808..c4fbd00374b 100644
--- a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php
+++ b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php
@@ -1,6 +1,12 @@
+/* Copyright (C) 2024-2025 MDW
*/
+/**
+ * @var int $colspan
+ */
+'
+@phan-var-force int $colspan
+';
// Add line to select existing file
if (!getDolGlobalString('EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES')) {
@@ -29,6 +35,7 @@ if (!getDolGlobalString('EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES')) {
$maxheightmini = 48;
$relativepath = (!empty($object->ref) ? dol_sanitizeFileName($object->ref) : '').'/';
$filei = 0;
+ $minifile = null;
// Loop on each attached file
foreach ($arrayoffiles as $file) {
$urlforhref = array();
@@ -95,6 +102,7 @@ if (!getDolGlobalString('EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES')) {
}
print '
';
+ // TODO: Check that $minifile has a proper value here (set in true part of if, not else part).
print $thumbshown ? $thumbshown : img_mime($minifile);
print '
';
diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php
index 93b6157ea19..a84871b25fc 100644
--- a/htdocs/fichinter/card-rec.php
+++ b/htdocs/fichinter/card-rec.php
@@ -10,7 +10,7 @@
* Copyright (C) 2016-2018 Charlie Benke
* Copyright (C) 2018-2024 Frédéric France
* Copyright (C) 2024 William Mead
- * Copyright (C) 2024 MDW
+ * Copyright (C) 2024-2025 MDW
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -121,7 +121,7 @@ $result = restrictedArea($user, 'ficheinter', $id, $objecttype);
$permissiontoadd = $user->hasRight('ficheinter', 'creer');
$permissiontodelete = $user->hasRight('ficheinter', 'supprimer');
-
+$objp = null;
/*
* Actions
@@ -215,7 +215,7 @@ if ($action == 'add' && $permissiontoadd) {
}
$newinter->entity = $object->entity;
- $newinter->duree = $object->duree;
+ $newinter->duration = $object->duration;
$newinter->description = $object->description;
$newinter->note_private = $object->note_private;
@@ -254,7 +254,7 @@ if ($action == 'add' && $permissiontoadd) {
} elseif ($action == 'setfrequency' && $permissiontoadd) {
// Set frequency and unit frequency
$object->fetch($id);
- $object->setFrequencyAndUnit(GETPOST('frequency', 'int'), GETPOST('unit_frequency', 'alpha'));
+ $object->setFrequencyAndUnit(GETPOSTINT('frequency'), GETPOST('unit_frequency', 'alpha'));
} elseif ($action == 'setdate_when' && $permissiontoadd) {
// Set next date of execution
$object->fetch($id);
@@ -280,6 +280,8 @@ llxHeader('', $langs->trans("RepeatableIntervention"), $help_url, '', 0, 0, '',
$form = new Form($db);
$fichinterrecstatic = new FichinterRec($db);
$companystatic = new Societe($db);
+$contratstatic = null;
+$projectstatic = null;
if (isModEnabled('contract')) {
$contratstatic = new Contrat($db);
}
@@ -508,7 +510,7 @@ if ($action == 'create') {
$object->fetch_thirdparty();
$author = new User($db);
- $author->fetch($object->user_author);
+ $author->fetch((int) $object->user_author);
$head = fichinter_rec_prepare_head($object);
@@ -535,11 +537,11 @@ if ($action == 'create') {
$morehtmlref .= '';
} else {
- $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1, '', 'maxwidth300');
+ $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, 'none', 0, 0, 0, 1, '', 'maxwidth300');
}
} else {
if (!empty($object->fk_project)) {
@@ -577,7 +579,7 @@ if ($action == 'create') {
print '
'.$langs->trans("Description").'
'.nl2br($object->description)."
";
// Contract
- if (isModEnabled('contract')) {
+ if (isModEnabled('contract') && $contratstatic !== null) {
$langs->load('contracts');
print '
';
print '
';
@@ -599,7 +601,7 @@ if ($action == 'create') {
if ($object->fk_contrat) {
$contratstatic = new Contrat($db);
$contratstatic->fetch($object->fk_contrat);
- print $contratstatic->getNomUrl(0, '', 1);
+ print $contratstatic->getNomUrl(0, 0, 1);
} else {
print " ";
}
@@ -666,7 +668,7 @@ if ($action == 'create') {
// Max period / Rest period
print '
';
if ($user->hasRight('ficheinter', 'creer') && ($action == 'nb_gen_max' || $object->frequency > 0)) {
- print $form->editfieldkey($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $object, $user->hasRight('facture', 'creer'));
+ print $form->editfieldkey($langs->trans("MaxPeriodNumber"), 'nb_gen_max', (string) $object->nb_gen_max, $object, $user->hasRight('facture', 'creer'));
} else {
print $langs->trans("MaxPeriodNumber");
}
@@ -743,6 +745,7 @@ if ($action == 'create') {
$type = $object->lines[$i]->product_type;
} // else { $object->lines[$i]->fk_product_type; }
+ // TODO: $objp is not set here, so why test?
if (isset($objp) && is_object($objp)) {
// Try to enhance type detection using date_start and date_end for free lines when type
// was not saved.
@@ -871,7 +874,7 @@ if ($action == 'create') {
print '
'.$langs->trans("None").'
';
}
- if (isModEnabled('contract')) {
+ if (isModEnabled('contract') && $contratstatic !== null) {
print '
';
if ($objp->fk_contrat > 0) {
$contratstatic->fetch($objp->fk_contrat);
@@ -879,7 +882,7 @@ if ($action == 'create') {
}
print '
';
}
- if (isModEnabled('project')) {
+ if (isModEnabled('project') && $projectstatic !== null) {
print '
';
if ($objp->fk_project > 0) {
$projectstatic->fetch($objp->fk_project);
diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php
index 07311a5ca20..f3c6ca5250f 100644
--- a/htdocs/fichinter/card.php
+++ b/htdocs/fichinter/card.php
@@ -11,7 +11,7 @@
* Copyright (C) 2020-2024 Frédéric France
* Copyright (C) 2023 Benjamin Grembi
* Copyright (C) 2023-2024 William Mead
- * Copyright (C) 2024 MDW
+ * Copyright (C) 2024-2025 MDW
* Copyright (C) 2024 Alexandre Spangaro
*
* This program is free software; you can redistribute it and/or modify
@@ -937,7 +937,7 @@ if ($action == 'create') {
$classname = ucfirst($subelement);
$objectsrc = new $classname($db);
'@phan-var-force Commande|Propal|Contrat $objectsrc';
- $objectsrc->fetch(GETPOST('originid'));
+ $objectsrc->fetch(GETPOSTINT('originid'));
if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) {
$objectsrc->fetch_lines();
$lines = $objectsrc->lines;
@@ -1048,7 +1048,7 @@ if ($action == 'create') {
print '
';
$adh = new Adherent($db);
- $result = $adh->fetch('', '', $object->id);
+ $result = $adh->fetch(0, '', $object->id);
if ($result > 0) {
$adh->ref = $adh->getFullName($langs);
print $adh->getNomUrl(1);
@@ -493,7 +493,7 @@ if ($object->id > 0) {
$boxstat = '';
// Nbre max d'elements des petites listes
- $MAXLIST = getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT');
+ $MAXLIST = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
print '';
print ' ';
@@ -614,7 +614,7 @@ if ($object->id > 0) {
print $boxstat;
- $MAXLIST = getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT');
+ $MAXLIST = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
/*
@@ -762,6 +762,7 @@ if ($object->id > 0) {
* Latest supplier orders
*/
$orderstatic = new CommandeFournisseur($db);
+ $orders2invoice = 0;
if ($user->hasRight("fournisseur", "commande", "lire")) {
// TODO move to DAO class
@@ -775,7 +776,7 @@ if ($object->id > 0) {
$sql2 .= ' AND s.rowid = '.((int) $object->id);
// Show orders we can bill
if (!getDolGlobalString('SUPPLIER_ORDER_TO_INVOICE_STATUS')) {
- $sql2 .= " AND c.fk_statut IN (".$db->sanitize(CommandeFournisseur::STATUS_RECEIVED_COMPLETELY).")"; // Must match filter in htdocs/fourn/commande/list.php
+ $sql2 .= " AND c.fk_statut IN (".$db->sanitize((string) CommandeFournisseur::STATUS_RECEIVED_COMPLETELY).")"; // Must match filter in htdocs/fourn/commande/list.php
} else {
// CommandeFournisseur::STATUS_ORDERSENT.", ".CommandeFournisseur::STATUS_RECEIVED_PARTIALLY.", ".CommandeFournisseur::STATUS_RECEIVED_COMPLETELY
$sql2 .= " AND c.fk_statut IN (".$db->sanitize(getDolGlobalString('SUPPLIER_ORDER_TO_INVOICE_STATUS')).")";
diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php
index 5f833ed119d..74fd7762873 100644
--- a/htdocs/public/payment/paymentko.php
+++ b/htdocs/public/payment/paymentko.php
@@ -3,7 +3,7 @@
* Copyright (C) 2006-2013 Laurent Destailleur
* Copyright (C) 2012 Regis Houssin
* Copyright (C) 2024-2025 Frédéric France
- * Copyright (C) 2024 MDW
+ * Copyright (C) 2024-2025 MDW
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ if (!defined('NOBROWSERNOTIF')) {
}
if (!defined('XFRAMEOPTIONS_ALLOWALL')) {
- define('XFRAMEOPTIONS_ALLOWALL', '1');
+ define('XFRAMEOPTIONS_ALLOWALL', '1');
}
// For MultiCompany module.
@@ -204,7 +204,7 @@ if (!empty($_SESSION['ipaddress'])) { // To avoid to make action twice
// Send warning of error to administrator
if ($sendemail) {
// Get default language to use for the company for supervision emails
- $myCompanyDefaultLang = $mysoc->default_lang;
+ $myCompanyDefaultLang = (string) $mysoc->default_lang;
if (empty($myCompanyDefaultLang) || $myCompanyDefaultLang === 'auto') {
// We must guess the language from the company country. We must not use the language of the visitor. This is a technical email for supervision
// so it must always be into the same language.
diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php
index 6d415d7820f..26b2db6e80b 100644
--- a/htdocs/public/payment/paymentok.php
+++ b/htdocs/public/payment/paymentok.php
@@ -589,7 +589,7 @@ if ($ispaymentok) {
// Set output language
$outputlangs = new Translate('', $conf);
- $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
+ $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? (string) $mysoc->default_lang : (string) $object->thirdparty->default_lang);
$paymentdate = $now;
$amount = $FinalPaymentAmt;
$formatteddate = dol_print_date($paymentdate, 'dayhour', 'auto', $outputlangs);
@@ -1446,7 +1446,7 @@ if ($ispaymentok) {
$formmail = new FormMail($db);
// Set output language
$outputlangs = new Translate('', $conf);
- $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang);
+ $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? (string) $mysoc->default_lang : (string) $thirdparty->default_lang);
// Load traductions files required by page
$outputlangs->loadLangs(array("main", "members", "eventorganization"));
// Get email content from template
diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php
index 2a6d965b012..a84b221ab06 100644
--- a/htdocs/societe/consumption.php
+++ b/htdocs/societe/consumption.php
@@ -5,7 +5,7 @@
* Copyright (C) 2015 Marcos García
* Copyright (C) 2015-2017 Ferran Marcet
* Copyright (C) 2021-2024 Frédéric France
- * Copyright (C) 2024 MDW
+ * Copyright (C) 2024-2025 MDW
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -416,7 +416,7 @@ if (!empty($sql_select)) {
$sql .= $where;
$sql .= dolSqlDateFilter($dateprint, 0, $month, $year);
if ($sref) {
- $sql .= " AND ".$db->sanitize($doc_number)." LIKE '%".$db->escape($sref)."%'";
+ $sql .= " AND ".$db->sanitize((string) $doc_number)." LIKE '%".$db->escape($sref)."%'";
}
if ($sprod_fulldescr) {
// We test both case description is correctly saved of was save after dol_escape_htmltag().