Skip to content

Commit

Permalink
Handle null values, fixes #18173 (#18174)
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher authored Oct 31, 2024
1 parent a073823 commit d92e54e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/CommonDBTM.php
Original file line number Diff line number Diff line change
Expand Up @@ -4764,7 +4764,7 @@ public static function getSpecificValueToDisplay($field, $values, array $options
* - comments : boolean / is the comments displayed near the value (default false)
* - any others options passed to specific display method
*
* @return string the string to display
* @return mixed the value to display
**/
public function getValueToDisplay($field_id_or_search_options, $values, $options = [])
{
Expand Down
4 changes: 2 additions & 2 deletions src/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -830,8 +830,8 @@ public static function getHistoryData(CommonDBTM $item, $start = 0, $limit = 0,
break;

default:
$data["old_value"] = RichText::getTextFromHtml($item->getValueToDisplay($searchopt, $data["old_value"]), false, true);
$data["new_value"] = RichText::getTextFromHtml($item->getValueToDisplay($searchopt, $data["new_value"]), false, true);
$data["old_value"] = RichText::getTextFromHtml($item->getValueToDisplay($searchopt, $data["old_value"]) ?? '', false, true);
$data["new_value"] = RichText::getTextFromHtml($item->getValueToDisplay($searchopt, $data["new_value"]) ?? '', false, true);
break;
}
}
Expand Down

0 comments on commit d92e54e

Please sign in to comment.