DirectorObjectForm: render inherited scalars only

fixes #2288
This commit is contained in:
Thomas Gelf 2021-03-11 23:45:54 +01:00
parent bb6530e9f9
commit 09a0323ad6
2 changed files with 2 additions and 1 deletions

View File

@ -26,6 +26,7 @@ next patch release (will be 1.8.1)
### User Interface
* FIX: don't fail when showing a Host overriding multiple inherited groups (#2253)
* FIX: deal with inherited values which are invalid for a select box (#2288)
### Automation, User Interface
* FIX: error message wording on failing related (or parent) object ref (#2224)

View File

@ -629,7 +629,7 @@ abstract class DirectorObjectForm extends DirectorForm
if (is_bool($inherited)) {
$inherited = $inherited ? 'y' : 'n';
}
if (array_key_exists($inherited, $multi)) {
if (is_scalar($inherited) && array_key_exists($inherited, $multi)) {
$multi[null] = $multi[$inherited] . sprintf($txtInherited, $inheritedFrom);
} else {
$multi[null] = $this->translate($this->translate('- inherited -'));