From 595abd50291ce6408a47ef335cf46693d0747aae Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 6 Apr 2023 14:57:49 +0200 Subject: [PATCH] fix : Warning: Undefined array key facture in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/compta/facture/card.php on line 3904 --- htdocs/compta/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 8f65df86da7..be552526e1f 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3901,7 +3901,7 @@ if ($action == 'create') { print $objectsrc->getNomUrl(1); // We check if Origin document (id and type is known) has already at least one invoice attached to it $objectsrc->fetchObjectLinked($originid, $origin, '', 'facture'); - if (is_array($objectsrc->linkedObjects['facture']) && count($objectsrc->linkedObjects['facture']) >= 1) { + if (isset($objectsrc->linkedObjects['facture']) && is_array($objectsrc->linkedObjects['facture']) && count($objectsrc->linkedObjects['facture']) >= 1) { setEventMessages('WarningBillExist', null, 'warnings'); echo ' - '.$langs->trans('LatestRelatedBill').' '.end($objectsrc->linkedObjects['facture'])->getNomUrl(1); }