Merge #16023 - Fix failure if relational display field value is NULL - "Display column for relationships"

Pull-request: #16023
Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2020-03-09 22:43:57 +01:00
commit 963f669634
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -5164,7 +5164,7 @@ class Results
* @param stdClass $meta the meta-information about the field
* @param string $where_comparison data for the where clause
*
* @return string formatted data
* @return string|null formatted data
*
* @access private
*
@ -5344,7 +5344,7 @@ class Results
) {
// user chose "relational display field" in the
// display options, so show display field in the cell
$displayedData = $default_function($dispval);
$displayedData = $dispval === null ? '<em>NULL</em>' : $default_function($dispval);
} else {
// otherwise display data in the cell
$displayedData = $default_function($displayedData);