From f660e13f20492388b5b2a3ed84b0702faaa2b91e Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 13 Jun 2023 19:47:21 +0200 Subject: [PATCH] fix : Warning: Undefined array key cat_fk in /home/httpd/vhosts/doliweb.com/httpdocs/categories/class/categorie.class.php on line 289 --- htdocs/categories/class/categorie.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 0a9ea52acd1..4af577ce217 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -286,8 +286,8 @@ class Categorie extends CommonObject $mapCode = $mapList['code']; self::$MAP_ID_TO_CODE[$mapId] = $mapCode; $this->MAP_ID[$mapCode] = $mapId; - $this->MAP_CAT_FK[$mapCode] = $mapList['cat_fk']; - $this->MAP_CAT_TABLE[$mapCode] = $mapList['cat_table']; + $this->MAP_CAT_FK[$mapCode] = isset($mapList['cat_fk']) ? $mapList['cat_fk'] : null; + $this->MAP_CAT_TABLE[$mapCode] = isset($mapList['cat_table']) ? $mapList['cat_table'] : null; $this->MAP_OBJ_CLASS[$mapCode] = $mapList['obj_class']; $this->MAP_OBJ_TABLE[$mapCode] = $mapList['obj_table']; }