From f0a4732d0b406f1dff956c09c63f217d30df5544 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Jun 2023 07:35:41 +0200 Subject: [PATCH] Fix php 8.2 --- htdocs/core/tpl/admin_extrafields_edit.tpl.php | 18 ++++++++++-------- htdocs/langs/en_US/admin.lang | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index 7e33d5e8364..294aea5e8e7 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -172,16 +172,18 @@ $css = $extrafields->attributes[$elementtype]['css'][$attrname]; $cssview = $extrafields->attributes[$elementtype]['cssview'][$attrname]; $csslist = $extrafields->attributes[$elementtype]['csslist'][$attrname]; -if ((($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) && is_array($param)) { - $param_chain = ''; - foreach ($param['options'] as $key => $value) { - if (strlen($key)) { - $param_chain .= $key.','.$value."\n"; +if (is_array($param)) { + if (($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) { + $param_chain = ''; + foreach ($param['options'] as $key => $value) { + if (strlen($key)) { + $param_chain .= $key.','.$value."\n"; + } } + } elseif (($type == 'sellist') || ($type == 'chkbxlst') || ($type == 'link') || ($type == 'password') || ($type == 'separate')) { + $paramlist = array_keys($param['options']); + $param_chain = $paramlist[0]; } -} elseif (($type == 'sellist') || ($type == 'chkbxlst') || ($type == 'link') || ($type == 'password') || ($type == 'separate')) { - $paramlist = array_keys($param['options']); - $param_chain = $paramlist[0]; } ?> diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 462b265f3d8..48f84a0e70b 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2361,7 +2361,7 @@ TriggerCodeInfo=Enter here the trigger code(s) that must generate a post of a we EditableWhenDraftOnly=If unchecked, the value can only be modified when object has a draft status CssOnEdit=Css on edit pages CssOnView=Css on view pages -CssOnList=Css on list pages +CssOnList=Css on lists HelpCssOnEditDesc=The Css used when editing the field.
Example: "minwiwdth100 maxwidth500 widthcentpercentminusx" HelpCssOnViewDesc=The Css used when viewing the field. HelpCssOnListDesc=The Css used when field is inside a list table.
Example: "tdoverflowmax200"