From 5fc40f2b121f35fcb629c75d604dfd8de8e45782 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 17 Mar 2021 14:32:25 +0100 Subject: [PATCH] FIX avoid php 8 warning --- htdocs/core/tpl/admin_extrafields_view.tpl.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/admin_extrafields_view.tpl.php b/htdocs/core/tpl/admin_extrafields_view.tpl.php index 829ccaee903..ef7d22337ac 100644 --- a/htdocs/core/tpl/admin_extrafields_view.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_view.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2012-2017 Regis Houssin + * Copyright (C) 2012-2021 Regis Houssin * Copyright (C) 2018-2019 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -71,7 +71,7 @@ if ($conf->multicompany->enabled) { print ' '; print "\n"; -if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafields->attributes[$elementtype]['type'])) { +if (isset($extrafields->attributes[$elementtype]['type']) && is_array($extrafields->attributes[$elementtype]['type']) && count($extrafields->attributes[$elementtype]['type'])) { foreach ($extrafields->attributes[$elementtype]['type'] as $key => $value) { /*if (! dol_eval($extrafields->attributes[$elementtype]['enabled'][$key], 1)) { // TODO Uncomment this to exclude extrafields of modules not enabled. Add a link to "Show extrafields disabled"