From b83b9ff598bba7fc67bc4513d30bf784f73bb9ad Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 25 Feb 2023 12:06:06 +0100 Subject: [PATCH 1/5] fix : Warning: Undefined array key tomail in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/actions_sendmails.inc.php on line 193 --- htdocs/core/actions_sendmails.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 4f7580bb8ca..e459437a74e 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -190,7 +190,7 @@ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPO $tmparray[] = trim(GETPOST('sendto', 'alphawithlgt')); } - if (trim($_POST['tomail'])) { + if (isset($_POST['tomail']) && trim($_POST['tomail'])) { // Recipients are provided into free hidden text field $tmparray[] = trim(GETPOST('tomail', 'alphawithlgt')); } From 8b09e0f09024e5115922e2c0c4ae05ceef0d9210 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 25 Feb 2023 12:38:01 +0100 Subject: [PATCH 2/5] fix : Warning: Undefined property: Societe:: in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/actions_sendmails.inc.php on line 350 --- htdocs/core/actions_sendmails.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index e459437a74e..5744316eb4a 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -346,7 +346,7 @@ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPO // Make substitution in email content $substitutionarray = getCommonSubstitutionArray($langs, 0, null, $object); $substitutionarray['__EMAIL__'] = $sendto; - $substitutionarray['__CHECK_READ__'] = (is_object($object) && is_object($object->thirdparty)) ? '' : ''; + $substitutionarray['__CHECK_READ__'] = (is_object($object) && is_object($object->thirdparty)) ? '' : ''; $parameters = array('mode'=>'formemail'); complete_substitutions_array($substitutionarray, $langs, $object, $parameters); From 05a32ab99368cfb42d3bf6007ac391ede2f000c6 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 25 Feb 2023 14:31:20 +0100 Subject: [PATCH 3/5] fix : Fatal error: Uncaught TypeError: Unsupported operand types: string / int in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/comm/propal/card.php on line 1420 --- htdocs/comm/propal/card.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index f2c549f91f7..e14a2c05246 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1363,6 +1363,9 @@ if (empty($reshook)) { $date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); $remise_percent = price2num(GETPOST('remise_percent'), '', 2); + if (empty($remise_percent)) { + $remise_percent = 0; + } // Prepare a price equivalent for minimum price check $pu_equivalent = $pu_ht; From 2c57198de763e3c5c6122a82c58369304218acec Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 25 Feb 2023 14:54:07 +0100 Subject: [PATCH 4/5] fix : Warning: Undefined property: stdClass:: in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/lib/files.lib.php on line 2847 and Attempt to read property lire on null in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/lib/files.lib.php on line 2847 --- htdocs/core/lib/files.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 23659cd769b..e380563d6c8 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -2842,9 +2842,9 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file = $conf->deplacement->dir_output.'/'.$original_file; //$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; - } elseif (($modulepart == 'propal' || $modulepart == 'propale') && !empty($conf->propal->multidir_output[$entity])) { + } elseif (($modulepart == 'propal' || $modulepart == 'propale') && isset($conf->propal->multidir_output[$entity])) { // Wrapping pour les propales - if ($fuser->rights->propal->{$lire} || preg_match('/^specimen/i', $original_file)) { + if (property_exists($fuser->rights, 'propal') && ($fuser->rights->propal->{$lire} || preg_match('/^specimen/i', $original_file))) { $accessallowed = 1; } $original_file = $conf->propal->multidir_output[$entity].'/'.$original_file; From ca1508e3331fff23e12c5734a5a12918558121ec Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 25 Feb 2023 16:29:55 +0100 Subject: [PATCH 5/5] fix : Warning: Undefined property: stdClass:: in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/lib/files.lib.php on line 2953 --- htdocs/core/lib/files.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index e380563d6c8..97b803822e9 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -2950,7 +2950,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, if (empty($entity) || (empty($conf->product->multidir_output[$entity]) && empty($conf->service->multidir_output[$entity]))) { return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); } - if (($fuser->rights->produit->{$lire} || $fuser->rights->service->{$lire}) || preg_match('/^specimen/i', $original_file)) { + if ((isset($fuser->rights->produit) && $fuser->rights->produit->{$lire}) || (isset($fuser->rights->service) && $fuser->rights->service->{$lire}) || preg_match('/^specimen/i', $original_file)) { $accessallowed = 1; } if (isModEnabled("product")) {