From 6c61b807786efbfc085c27837073c33dc55242f9 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 5 Feb 2023 14:57:36 +0100 Subject: [PATCH 1/4] fix : Warning: Trying to access array offset on value of type bool in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/includes/tcpdi/tcpdi_parser.php on line 1376 --- htdocs/includes/tcpdi/tcpdi_parser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/includes/tcpdi/tcpdi_parser.php b/htdocs/includes/tcpdi/tcpdi_parser.php index 13e9839f2b4..174c496d4f4 100644 --- a/htdocs/includes/tcpdi/tcpdi_parser.php +++ b/htdocs/includes/tcpdi/tcpdi_parser.php @@ -1365,7 +1365,7 @@ class tcpdi_parser { $obj = $this->getObjectVal($obj); if (isset ($obj[1][1]['/Rotate'])) { $res = $this->getObjectVal($obj[1][1]['/Rotate']); - if ($res[0] == PDF_TYPE_OBJECT) + if (isset($res[0]) && $res[0] == PDF_TYPE_OBJECT) return $res[1]; return $res; } else { @@ -1373,7 +1373,7 @@ class tcpdi_parser { return false; } else { $res = $this->_getPageRotation($obj[1][1]['/Parent']); - if ($res[0] == PDF_TYPE_OBJECT) + if (isset($res[0]) && $res[0] == PDF_TYPE_OBJECT) return $res[1]; return $res; } From d903008786951cb9302c7863a1e28b4570a567df Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 5 Feb 2023 15:14:23 +0100 Subject: [PATCH 2/4] fix : Warning: Undefined variable in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/commande/card.php on line 688 --- htdocs/commande/card.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 0a69e485adf..8521e5be6fc 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2013 Juanjo Menent - * Copyright (C) 2011-2022 Philippe Grand + * Copyright (C) 2011-2023 Philippe Grand * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2012-2016 Marcos GarcĂ­a * Copyright (C) 2012 Cedric Salvador @@ -660,6 +660,10 @@ if (empty($reshook)) { $price_ht_devise = ''; $price_ttc = ''; $price_ttc_devise = ''; + $pu_ht = ''; + $pu_ttc = ''; + $pu_ht_devise = ''; + $pu_ttc_devise = ''; if (GETPOST('price_ht') !== '') { $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); From 7a1c9b468acd93f41826603b6ceabd6e8a249578 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 5 Feb 2023 17:04:13 +0100 Subject: [PATCH 3/4] fix : Warning: Undefined array key label in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/expedition/card.php on line 340 --- htdocs/expedition/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 8c62cdc3914..a9fcea34440 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -337,7 +337,7 @@ if (empty($reshook)) { // Extrafields $array_options[$i] = $extrafields->getOptionalsFromPost($object->table_element_line, $i); // Unset extrafield - if (is_array($extrafields->attributes[$object->table_element_line]['label'])) { + if (isset($extrafields->attributes[$object->table_element_line]['label']) && is_array($extrafields->attributes[$object->table_element_line]['label'])) { // Get extra fields foreach ($extrafields->attributes[$object->table_element_line]['label'] as $key => $value) { unset($_POST["options_".$key]); From 0633ead0e6dde2f503780d27166c47e612d44436 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 5 Feb 2023 18:05:03 +0100 Subject: [PATCH 4/4] fix : Warning: Undefined array key delivery in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/lib/sendings.lib.php on line 53 --- htdocs/core/lib/sendings.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index 6d9598a04ae..a2fbaeef92e 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -50,7 +50,7 @@ function shipping_prepare_head($object) if ($conf->delivery_note->enabled && $user->rights->expedition->delivery->lire) { // delivery link $object->fetchObjectLinked($object->id, $object->element); - if (is_array($object->linkedObjectsIds['delivery']) && count($object->linkedObjectsIds['delivery']) > 0) { // If there is a delivery + if (isset($object->linkedObjectsIds['delivery']) && is_array($object->linkedObjectsIds['delivery']) && count($object->linkedObjectsIds['delivery']) > 0) { // If there is a delivery // Take first one element of array $tmp = reset($object->linkedObjectsIds['delivery']);