Skip to content

Commit c6c3e07

Browse files
authored
Fix(Condition): Fix display when value is no more available (#902)
1 parent ff6ee5a commit c6c3e07

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [UNRELAESE]
99

10+
- Fix `PluginFieldsContainerDisplayCondition` display when value is no more available.
11+
1012
## [1.21.17] - 2024-12-26
1113

1214
### Fixed

inc/containerdisplaycondition.class.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,9 @@ public static function getRawValue($searchoption_id, $itemtype, $value)
313313
if ($so['datatype'] == 'dropdown' || ($so['datatype'] == 'itemlink' && $so['table'] !== $itemtypetable)) {
314314
$dropdown_itemtype = getItemTypeForTable($so['table']);
315315
$dropdown = new $dropdown_itemtype();
316-
$dropdown->getFromDB($value);
317-
$raw_value = $dropdown->fields['name'];
316+
if ($dropdown->getFromDB($value)) {
317+
$raw_value = $dropdown->fields['name'];
318+
}
318319
} elseif ($so['datatype'] == 'specific' && get_parent_class($itemtype) == CommonITILObject::getType()) {
319320
switch ($so['field']) {
320321
case 'status':

0 commit comments

Comments
 (0)