forked from Wavyzz/dolibarr
fix phpstan (#30944)
* fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan
This commit is contained in:
@@ -399,7 +399,7 @@ class PaymentSocialContribution extends CommonObject
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."paiementcharge SET";
|
||||
$sql .= " fk_charge=".(isset($this->fk_charge) ? ((int) $this->fk_charge) : "null").",";
|
||||
$sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
|
||||
$sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " datep=".(dol_strlen($this->datep) != 0 ? "'".$this->db->idate($this->datep)."'" : 'null').",";
|
||||
$sql .= " amount=".(isset($this->amount) ? price2num($this->amount) : "null").",";
|
||||
$sql .= " fk_typepaiement=".(isset($this->fk_typepaiement) ? ((int) $this->fk_typepaiement) : "null").",";
|
||||
|
||||
@@ -400,7 +400,7 @@ class PaymentVAT extends CommonObject
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_vat SET";
|
||||
$sql .= " fk_tva=".(isset($this->fk_tva) ? ((int) $this->fk_tva) : "null").",";
|
||||
$sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
|
||||
$sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " datep=".(dol_strlen($this->datep) != 0 ? "'".$this->db->idate($this->datep)."'" : 'null').",";
|
||||
$sql .= " amount=".(isset($this->amount) ? (float) price2num($this->amount) : "null").",";
|
||||
$sql .= " fk_typepaiement=".(isset($this->fk_typepaiement) ? ((int) $this->fk_typepaiement) : "null").",";
|
||||
|
||||
@@ -953,7 +953,7 @@ class ContratLigne extends CommonObjectLine
|
||||
$this->commentaire = $comment;
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."contratdet SET statut = ".((int) $this->statut).",";
|
||||
$sql .= " date_ouverture = ".(dol_strlen($this->date_start_real) != 0 ? "'".$this->db->idate($this->date_start_real)."'" : "null").",";
|
||||
$sql .= " date_ouverture = ".(dol_strlen((string) $this->date_start_real) != 0 ? "'".$this->db->idate($this->date_start_real)."'" : "null").",";
|
||||
if ($date_end >= 0) {
|
||||
$sql .= " date_fin_validite = ".(dol_strlen($this->date_end) != 0 ? "'".$this->db->idate($this->date_end)."'" : "null").",";
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ class PaymentDonation extends CommonObject
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_donation SET";
|
||||
$sql .= " fk_donation=".(isset($this->fk_donation) ? $this->fk_donation : "null").",";
|
||||
$sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
|
||||
$sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " datep=".(dol_strlen($this->datep) != 0 ? "'".$this->db->idate($this->datep)."'" : 'null').",";
|
||||
$sql .= " amount=".(isset($this->amount) ? $this->amount : "null").",";
|
||||
$sql .= " fk_typepayment=".(isset($this->fk_typepayment) ? $this->fk_typepayment : "null").",";
|
||||
|
||||
@@ -337,7 +337,7 @@ class EcmFiles extends CommonObject
|
||||
$sql .= ' '.(!isset($this->gen_or_uploaded) ? 'NULL' : "'".$this->db->escape($this->gen_or_uploaded)."'").',';
|
||||
$sql .= ' '.(!isset($this->extraparams) ? 'NULL' : "'".$this->db->escape($this->extraparams)."'").',';
|
||||
$sql .= " '".$this->db->idate($this->date_c)."',";
|
||||
$sql .= ' '.(!isset($this->date_m) || dol_strlen($this->date_m) == 0 ? 'NULL' : "'".$this->db->idate($this->date_m)."'").',';
|
||||
$sql .= ' '.(!isset($this->date_m) || dol_strlen((string) $this->date_m) == 0 ? 'NULL' : "'".$this->db->idate($this->date_m)."'").',';
|
||||
$sql .= ' '.(!isset($this->fk_user_c) ? $user->id : $this->fk_user_c).',';
|
||||
$sql .= ' '.(!isset($this->fk_user_m) ? 'NULL' : $this->fk_user_m).',';
|
||||
$sql .= ' '.(!isset($this->acl) ? 'NULL' : "'".$this->db->escape($this->acl)."'").',';
|
||||
@@ -732,7 +732,7 @@ class EcmFiles extends CommonObject
|
||||
$sql .= ' gen_or_uploaded = '.(isset($this->gen_or_uploaded) ? "'".$this->db->escape($this->gen_or_uploaded)."'" : "null").',';
|
||||
$sql .= ' extraparams = '.(isset($this->extraparams) ? "'".$this->db->escape($this->extraparams)."'" : "null").',';
|
||||
$sql .= ' date_c = '.(!isset($this->date_c) || dol_strlen($this->date_c) != 0 ? "'".$this->db->idate($this->date_c)."'" : 'null').',';
|
||||
//$sql .= ' tms = '.(! isset($this->date_m) || dol_strlen($this->date_m) != 0 ? "'".$this->db->idate($this->date_m)."'" : 'null').','; // Field automatically updated
|
||||
//$sql .= ' tms = '.(! isset($this->date_m) || dol_strlen((string) $this->date_m) != 0 ? "'".$this->db->idate($this->date_m)."'" : 'null').','; // Field automatically updated
|
||||
$sql .= ' fk_user_m = '.($this->fk_user_m > 0 ? $this->fk_user_m : $user->id).',';
|
||||
$sql .= ' acl = '.(isset($this->acl) ? "'".$this->db->escape($this->acl)."'" : "null").',';
|
||||
$sql .= ' src_object_id = '.($this->src_object_id > 0 ? $this->src_object_id : "null").',';
|
||||
|
||||
@@ -340,7 +340,7 @@ class PaymentExpenseReport extends CommonObject
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_expensereport SET";
|
||||
$sql .= " fk_expensereport=".(isset($this->fk_expensereport) ? $this->fk_expensereport : "null").",";
|
||||
$sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
|
||||
$sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " datep=".(dol_strlen($this->datep) != 0 ? "'".$this->db->idate($this->datep)."'" : 'null').",";
|
||||
$sql .= " amount=".(isset($this->amount) ? $this->amount : "null").",";
|
||||
$sql .= " fk_typepayment=".(isset($this->fk_typepayment) ? $this->fk_typepayment : "null").",";
|
||||
|
||||
@@ -429,7 +429,7 @@ class Fichinter extends CommonObject
|
||||
if (!is_numeric($this->duration)) {
|
||||
$this->duration = 0;
|
||||
}
|
||||
if (!dol_strlen($this->fk_project)) {
|
||||
if (!dol_strlen((string) $this->fk_project)) {
|
||||
$this->fk_project = 0;
|
||||
}
|
||||
if (isset($this->ref_client)) {
|
||||
|
||||
@@ -1257,10 +1257,10 @@ class FactureFournisseur extends CommonInvoice
|
||||
$sql .= " type=".(isset($this->type) ? ((int) $this->type) : "null").",";
|
||||
$sql .= " subtype=".((int) $this->subtype).",";
|
||||
$sql .= " fk_soc=".(isset($this->socid) ? ((int) $this->socid) : "null").",";
|
||||
$sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
|
||||
$sql .= " datef=".(dol_strlen($this->date) != 0 ? "'".$this->db->idate($this->date)."'" : 'null').",";
|
||||
if (dol_strlen($this->tms) != 0) {
|
||||
$sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " datec=".(dol_strlen((string) $this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
|
||||
$sql .= " datef=".(dol_strlen((string) $this->date) != 0 ? "'".$this->db->idate($this->date)."'" : 'null').",";
|
||||
if (dol_strlen((string) $this->tms) != 0) {
|
||||
$sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
}
|
||||
$sql .= " libelle=".(isset($this->label) ? "'".$this->db->escape($this->label)."'" : "null").",";
|
||||
$sql .= " paye=".(isset($this->paid) ? ((int) $this->paid) : "0").",";
|
||||
@@ -1278,7 +1278,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
$sql .= " vat_reverse_charge = ".($this->vat_reverse_charge != '' ? ((int) $this->db->escape($this->vat_reverse_charge)) : 0).",";
|
||||
$sql .= " fk_projet=".(!empty($this->fk_project) ? ((int) $this->fk_project) : "null").",";
|
||||
$sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? ((int) $this->cond_reglement_id) : "null").",";
|
||||
$sql .= " date_lim_reglement=".(dol_strlen($this->date_echeance) != 0 ? "'".$this->db->idate($this->date_echeance)."'" : 'null').",";
|
||||
$sql .= " date_lim_reglement=".(dol_strlen((string) $this->date_echeance) != 0 ? "'".$this->db->idate($this->date_echeance)."'" : 'null').",";
|
||||
$sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").",";
|
||||
$sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").",";
|
||||
$sql .= " model_pdf=".(isset($this->model_pdf) ? "'".$this->db->escape($this->model_pdf)."'" : "null").",";
|
||||
|
||||
@@ -333,7 +333,7 @@ class LoanSchedule extends CommonObject
|
||||
|
||||
$sql .= " fk_loan=".(isset($this->fk_loan) ? $this->fk_loan : "null").",";
|
||||
$sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
|
||||
$sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " datep=".(dol_strlen($this->datep) != 0 ? "'".$this->db->idate($this->datep)."'" : 'null').",";
|
||||
$sql .= " amount_capital=".(isset($this->amount_capital) ? $this->amount_capital : "null").",";
|
||||
$sql .= " amount_insurance=".(isset($this->amount_insurance) ? $this->amount_insurance : "null").",";
|
||||
|
||||
@@ -368,7 +368,7 @@ class PaymentLoan extends CommonObject
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_loan SET";
|
||||
$sql .= " fk_loan=".(isset($this->fk_loan) ? $this->fk_loan : "null").",";
|
||||
$sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
|
||||
$sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " datep=".(dol_strlen($this->datep) != 0 ? "'".$this->db->idate($this->datep)."'" : 'null').",";
|
||||
$sql .= " amount_capital=".(isset($this->amount_capital) ? $this->amount_capital : "null").",";
|
||||
$sql .= " amount_insurance=".(isset($this->amount_insurance) ? $this->amount_insurance : "null").",";
|
||||
|
||||
@@ -782,7 +782,7 @@ class ProductCustomerPrice extends CommonObject
|
||||
|
||||
$sql .= " entity=".$conf->entity.",";
|
||||
$sql .= " datec='".$this->db->idate(dol_now())."',";
|
||||
$sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " fk_product=".(isset($this->fk_product) ? $this->fk_product : "null").",";
|
||||
$sql .= " fk_soc=".(isset($this->fk_soc) ? $this->fk_soc : "null").",";
|
||||
$sql .= " ref_customer=".(isset($this->ref_customer) ? "'".$this->db->escape($this->ref_customer)."'" : "null").",";
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2019 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2023 Vincent de Grandpré <vincent@de-grandpre.quebec>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
@@ -227,7 +228,7 @@ if ($sall) {
|
||||
$sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $sall);
|
||||
}
|
||||
// if the type is not 1, we show all products (type = 0,2,3)
|
||||
if (dol_strlen($type)) {
|
||||
if (dol_strlen((string) $type)) {
|
||||
if ($type == 1) {
|
||||
$sql .= " AND p.fk_product_type = '1'";
|
||||
} else {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2019 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2021 Noé Cendrier <noe.cendrier@altairis.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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
|
||||
@@ -296,7 +297,7 @@ if ($search_all) {
|
||||
$sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $search_all);
|
||||
}
|
||||
// if the type is not 1, we show all products (type = 0,2,3)
|
||||
if (dol_strlen($type)) {
|
||||
if (dol_strlen((string) $type)) {
|
||||
if ($type == 1) {
|
||||
$sql .= " AND p.fk_product_type = '1'";
|
||||
} else {
|
||||
|
||||
@@ -306,13 +306,13 @@ class Productlot extends CommonObject
|
||||
}
|
||||
|
||||
if ($checkSellByMandatory) {
|
||||
if (!isset($sellBy) || dol_strlen($sellBy) == 0) {
|
||||
if (!isset($sellBy) || dol_strlen((string) $sellBy) == 0) {
|
||||
// error : sell by is mandatory
|
||||
$errorMsgArr[] = $langs->trans('ErrorFieldRequired', $langs->transnoentities('SellByDate'));
|
||||
}
|
||||
}
|
||||
if ($checkEatByMandatory) {
|
||||
if (!isset($eatBy) || dol_strlen($eatBy) == 0) {
|
||||
if (!isset($eatBy) || dol_strlen((string) $eatBy) == 0) {
|
||||
// error : eat by is mandatory
|
||||
$errorMsgArr[] = $langs->trans('ErrorFieldRequired', $langs->transnoentities('EatByDate'));
|
||||
}
|
||||
@@ -606,7 +606,7 @@ class Productlot extends CommonObject
|
||||
$sql .= ' qc_frequency = '.(!empty($this->qc_frequency) ? (int) $this->qc_frequency : 'null').',';
|
||||
$sql .= ' lifetime = '.(!empty($this->lifetime) ? (int) $this->lifetime : 'null').',';
|
||||
$sql .= ' datec = ' . (!isset($this->datec) || dol_strlen($this->datec) != 0 ? "'" . $this->db->idate($this->datec) . "'" : 'null') . ',';
|
||||
$sql .= ' tms = ' . (dol_strlen($this->tms) != 0 ? "'" . $this->db->idate($this->tms) . "'" : "'" . $this->db->idate(dol_now()) . "'") . ',';
|
||||
$sql .= ' tms = ' . (dol_strlen((string) $this->tms) != 0 ? "'" . $this->db->idate($this->tms) . "'" : "'" . $this->db->idate(dol_now()) . "'") . ',';
|
||||
$sql .= ' fk_user_creat = ' . (isset($this->fk_user_creat) ? $this->fk_user_creat : "null") . ',';
|
||||
$sql .= ' fk_user_modif = ' . (isset($this->fk_user_modif) ? $this->fk_user_modif : "null") . ',';
|
||||
$sql .= ' import_key = ' . (isset($this->import_key) ? $this->import_key : "null");
|
||||
|
||||
@@ -354,7 +354,7 @@ class ProductStockEntrepot extends CommonObject
|
||||
// Update request
|
||||
$sql = 'UPDATE '.$this->db->prefix().$this->table_element.' SET';
|
||||
|
||||
$sql .= ' tms = '.(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : "'".$this->db->idate(dol_now())."'").',';
|
||||
$sql .= ' tms = '.(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : "'".$this->db->idate(dol_now())."'").',';
|
||||
$sql .= ' fk_product = '.(isset($this->fk_product) ? $this->fk_product : "null").',';
|
||||
$sql .= ' fk_entrepot = '.(isset($this->fk_entrepot) ? $this->fk_entrepot : "null").',';
|
||||
$sql .= ' seuil_stock_alerte = '.(isset($this->seuil_stock_alerte) ? $this->seuil_stock_alerte : "null").',';
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2014 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2016 ATM Consulting <support@atm-consulting.fr>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2021 Antonin MARCHAL <antonin@letempledujeu.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
@@ -387,7 +387,7 @@ if ($sall) {
|
||||
$sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $sall);
|
||||
}
|
||||
// if the type is not 1, we show all products (type = 0,2,3)
|
||||
if (dol_strlen($type)) {
|
||||
if (dol_strlen((string) $type)) {
|
||||
if ($type == 1) {
|
||||
$sql .= ' AND p.fk_product_type = 1';
|
||||
} else {
|
||||
|
||||
@@ -415,7 +415,7 @@ class ReceptionLineBatch extends CommonObjectLine
|
||||
$sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
|
||||
$sql .= " comment=".(isset($this->comment) ? "'".$this->db->escape($this->comment)."'" : "null").",";
|
||||
$sql .= " status=".(isset($this->status) ? $this->status : "null").",";
|
||||
$sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " batch=".(isset($this->batch) ? "'".$this->db->escape($this->batch)."'" : "null").",";
|
||||
$sql .= " eatby=".(dol_strlen($this->eatby) != 0 ? "'".$this->db->idate($this->eatby)."'" : 'null').",";
|
||||
$sql .= " sellby=".(dol_strlen($this->sellby) != 0 ? "'".$this->db->idate($this->sellby)."'" : 'null');
|
||||
|
||||
@@ -752,7 +752,7 @@ class Dolresource extends CommonObject
|
||||
$sql .= " element_type = ".(isset($this->element_type) ? "'".$this->db->escape($this->element_type)."'" : "null").",";
|
||||
$sql .= " busy = ".(isset($this->busy) ? (int) $this->busy : "null").",";
|
||||
$sql .= " mandatory = ".(isset($this->mandatory) ? (int) $this->mandatory : "null").",";
|
||||
$sql .= " tms = ".(dol_strlen($this->date_modification) != 0 ? "'".$this->db->idate($this->date_modification)."'" : 'null');
|
||||
$sql .= " tms = ".(dol_strlen((string) $this->date_modification) != 0 ? "'".$this->db->idate($this->date_modification)."'" : 'null');
|
||||
$sql .= " WHERE rowid=".((int) $this->id);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@@ -440,7 +440,7 @@ class PaymentSalary extends CommonObject
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_salary SET";
|
||||
$sql .= " fk_salary=".(isset($this->fk_salary) ? $this->fk_salary : "null").",";
|
||||
$sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').",";
|
||||
$sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " tms=".(dol_strlen((string) $this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').",";
|
||||
$sql .= " datep=".(dol_strlen($this->datepaye) != 0 ? "'".$this->db->idate($this->datepaye)."'" : 'null').",";
|
||||
$sql .= " amount=".(isset($this->amount) ? $this->amount : "null").",";
|
||||
$sql .= " fk_typepayment=".(isset($this->fk_typepayment) ? $this->fk_typepayment : "null").",";
|
||||
|
||||
@@ -571,8 +571,8 @@ class Ticket extends CommonObject
|
||||
$sql .= " ".(empty($this->category_code) || $this->category_code == '-1' ? 'NULL' : "'".$this->db->escape($this->category_code)."'").",";
|
||||
$sql .= " ".(!isset($this->severity_code) ? 'NULL' : "'".$this->db->escape($this->severity_code)."'").",";
|
||||
$sql .= " ".(!isDolTms($this->datec) ? 'NULL' : "'".$this->db->idate($this->datec)."'").",";
|
||||
$sql .= " ".(!isset($this->date_read) || dol_strlen($this->date_read) == 0 ? 'NULL' : "'".$this->db->idate($this->date_read)."'").",";
|
||||
$sql .= " ".(!isset($this->date_close) || dol_strlen($this->date_close) == 0 ? 'NULL' : "'".$this->db->idate($this->date_close)."'");
|
||||
$sql .= " ".(!isset($this->date_read) || dol_strlen((string) $this->date_read) == 0 ? 'NULL' : "'".$this->db->idate($this->date_read)."'").",";
|
||||
$sql .= " ".(!isset($this->date_close) || dol_strlen((string) $this->date_close) == 0 ? 'NULL' : "'".$this->db->idate($this->date_close)."'");
|
||||
$sql .= ", ".((int) $this->entity);
|
||||
$sql .= ", ".(!isset($this->notify_tiers_at_create) ? 1 : ((int) $this->notify_tiers_at_create));
|
||||
$sql .= ", '".$this->db->escape($this->model_pdf)."'";
|
||||
@@ -1108,10 +1108,10 @@ class Ticket extends CommonObject
|
||||
$sql .= " category_code=".(isset($this->category_code) ? "'".$this->db->escape($this->category_code)."'" : "null").",";
|
||||
$sql .= " severity_code=".(isset($this->severity_code) ? "'".$this->db->escape($this->severity_code)."'" : "null").",";
|
||||
$sql .= " datec=".(isDolTms($this->datec) ? "'".$this->db->idate($this->datec)."'" : 'null').",";
|
||||
$sql .= " date_read=".(dol_strlen($this->date_read) != 0 ? "'".$this->db->idate($this->date_read)."'" : 'null').",";
|
||||
$sql .= " date_last_msg_sent=".(dol_strlen($this->date_last_msg_sent) != 0 ? "'".$this->db->idate($this->date_last_msg_sent)."'" : 'null').",";
|
||||
$sql .= " date_read=".(dol_strlen((string) $this->date_read) != 0 ? "'".$this->db->idate($this->date_read)."'" : 'null').",";
|
||||
$sql .= " date_last_msg_sent=".(dol_strlen((string) $this->date_last_msg_sent) != 0 ? "'".$this->db->idate($this->date_last_msg_sent)."'" : 'null').",";
|
||||
$sql .= " model_pdf=".(isset($this->model_pdf) ? "'".$this->db->escape($this->model_pdf)."'" : "null").",";
|
||||
$sql .= " date_close=".(dol_strlen($this->date_close) != 0 ? "'".$this->db->idate($this->date_close)."'" : 'null');
|
||||
$sql .= " date_close=".(dol_strlen((string) $this->date_close) != 0 ? "'".$this->db->idate($this->date_close)."'" : 'null');
|
||||
$sql .= " WHERE rowid=".((int) $this->id);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@@ -218,9 +218,9 @@ class Website extends CommonObject
|
||||
$sql .= ' '.(!isset($this->fk_default_home) ? 'NULL' : $this->fk_default_home).',';
|
||||
$sql .= ' '.(!isset($this->virtualhost) ? 'NULL' : "'".$this->db->escape($this->virtualhost)."'").",";
|
||||
$sql .= ' '.(!isset($this->fk_user_creat) ? $user->id : $this->fk_user_creat).',';
|
||||
$sql .= ' '.(!isset($this->date_creation) || dol_strlen($this->date_creation) == 0 ? 'NULL' : "'".$this->db->idate($this->date_creation)."'").",";
|
||||
$sql .= ' '.(!isset($this->date_creation) || dol_strlen((string) $this->date_creation) == 0 ? 'NULL' : "'".$this->db->idate($this->date_creation)."'").",";
|
||||
$sql .= ' '.((int) $this->position).",";
|
||||
$sql .= ' '.(!isset($this->date_modification) || dol_strlen($this->date_modification) == 0 ? 'NULL' : "'".$this->db->idate($this->date_modification)."'");
|
||||
$sql .= ' '.(!isset($this->date_modification) || dol_strlen((string) $this->date_modification) == 0 ? 'NULL' : "'".$this->db->idate($this->date_modification)."'");
|
||||
$sql .= ')';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@@ -77,7 +77,6 @@ parameters:
|
||||
- '#on array{url: mixed} in empty\(\) does not exist.#'
|
||||
- '#dol_copy expects string, int given#'
|
||||
- '#dol_getIdFromCode expects string, int given#'
|
||||
- '#dol_strlen expects string, int given#'
|
||||
- '#EvalMath::trigger\(\) expects string, int given#'
|
||||
- '#get_next_value expects string, int given#'
|
||||
- '#pdf_writeLinkedObjects expects string, int given#'
|
||||
|
||||
Reference in New Issue
Block a user