mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX: Verification of variables (#28623)
* Verifcation of variables Modification of the variable setting before its use. * To check if the property exists * Modification as per @frederic34 suggestion * Update propal.class.php * Application of coding rules Modification of the called function. * Verification of variables * Verification of variable * Typo error * Update actions_sendmails.inc.php --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
6f38f4030a
commit
5371db3c0b
|
|
@ -2704,7 +2704,7 @@ class Propal extends CommonObject
|
|||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
// Status self::STATUS_REFUSED by default
|
||||
$modelpdf = getDolGlobalString('PROPALE_ADDON_PDF_ODT_CLOSED') ? $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED : $this->model_pdf;
|
||||
$modelpdf = getDolGlobalString('PROPALE_ADDON_PDF_ODT_CLOSED', $this->model_pdf);
|
||||
$trigger_name = 'PROPAL_CLOSE_REFUSED'; // used later in call_trigger()
|
||||
|
||||
if ($status == self::STATUS_SIGNED) { // Status self::STATUS_SIGNED
|
||||
|
|
@ -2814,7 +2814,7 @@ class Propal extends CommonObject
|
|||
}
|
||||
|
||||
if (!$error) {
|
||||
$modelpdf = $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED ? $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED : $this->model_pdf;
|
||||
$modelpdf = getDolGlobalString('PROPALE_ADDON_PDF_ODT_CLOSED', $this->model_pdf);
|
||||
|
||||
if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) {
|
||||
// Define output language
|
||||
|
|
|
|||
|
|
@ -1820,7 +1820,7 @@ if (empty($reshook)) {
|
|||
$date_end,
|
||||
0,
|
||||
$lines[$i]->info_bits,
|
||||
$lines[$i]->fk_remise_except,
|
||||
isset($lines[$i]->fk_remise_except) ? $lines[$i]->fk_remise_except : null,
|
||||
'HT',
|
||||
0,
|
||||
$product_type,
|
||||
|
|
@ -1829,7 +1829,7 @@ if (empty($reshook)) {
|
|||
$object->origin,
|
||||
$lines[$i]->rowid,
|
||||
$fk_parent_line,
|
||||
$lines[$i]->fk_fournprice,
|
||||
isset($lines[$i]->fk_fournprice) ? $lines[$i]->fk_fournprice : null,
|
||||
$lines[$i]->pa_ht,
|
||||
$label,
|
||||
$array_options,
|
||||
|
|
|
|||
|
|
@ -434,10 +434,10 @@ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPO
|
|||
setEventMessages($mesg, null, 'mesgs');
|
||||
|
||||
$moreparam = '';
|
||||
if (isset($paramname2) || isset($paramval2)) {
|
||||
if (isset($paramval2)) {
|
||||
$moreparam .= '&'.($paramname2 ? $paramname2 : 'mid').'='.$paramval2;
|
||||
}
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname ? $paramname : 'id').'='.(is_object($object) ? $object->id : '').$moreparam);
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname ?? 'id').'='.(is_object($object) ? $object->id : '').$moreparam);
|
||||
exit;
|
||||
} else {
|
||||
$langs->load("other");
|
||||
|
|
|
|||
|
|
@ -753,7 +753,7 @@ if (empty($reshook)) {
|
|||
|
||||
|
||||
// Update linked member
|
||||
if (!$error && $object->fk_soc > 0) {
|
||||
if (!$error && isset($object->fk_soc) && $object->fk_soc > 0) {
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent";
|
||||
$sql .= " SET fk_soc = NULL WHERE fk_soc = ".((int) $socid);
|
||||
if (!$object->db->query($sql)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user