Fix "Link not found!" on foreign columns

It also generated invalid queries with no column name to select.

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2022-10-24 13:13:12 +02:00
parent ce47abc300
commit 8424e75907
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -4416,7 +4416,10 @@ class Results
$relation = $map[$meta->name];
// Field to display from the foreign table?
$dispval = '';
if ($relation[2] !== '') {
// Check that we have a valid column name
// Relation::getDisplayField() returns false by default
if ($relation[2] !== '' && $relation[2] !== false) {
$dispval = $this->getFromForeign($relation, $whereComparison);
}