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"