diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 5a668879cb2..056e6a26a93 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -9354,7 +9354,7 @@ abstract class CommonObject // Otherwise, they would be empty after an update of the object. See also getOptionalsFromPost // TODO: We should not have this hidden field, and action='update' should be done only if field was POSTED by form. $ef_name = 'options_' . $key; - $ef_value = $this->array_options[$ef_name]; + $ef_value = isset($this->array_options[$ef_name]) ? $this->array_options[$ef_name] : ''; $out .= '' . "\n"; continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list and <> 4 = not visible at the creation } elseif ($mode == 'view' && empty($visibility)) { @@ -9723,7 +9723,7 @@ abstract class CommonObject return $user->hasRight($module, $element); } - return $user->rights->$element; + return isset($user->rights->$element) ? $user->rights->$element : null; } /** diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 43db189dd0a..7ffba0cbae5 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6025,7 +6025,7 @@ class Form $moreattr = (!empty($input['moreattr']) ? ' ' . $input['moreattr'] : ''); $morecss = (!empty($input['morecss']) ? ' ' . $input['morecss'] : ''); - $more .= '' . "\n"; + $more .= '' . "\n"; // 'value' non fourni par tous les appelants } } } @@ -6077,10 +6077,10 @@ class Form $more .= '