Fixed exception on table.

This commit is contained in:
Jan Böhmer 2020-02-02 13:11:17 +01:00
parent 6369ee2e61
commit 5a670f71f6

View file

@ -72,7 +72,7 @@ class EntityColumn extends AbstractColumn
/** @var AbstractDBElement|null $entity */ /** @var AbstractDBElement|null $entity */
$entity = $this->accessor->getValue($context, $options['property']); $entity = $this->accessor->getValue($context, $options['property']);
if ($entity) { if ($entity !== null) {
if (null !== $entity->getID()) { if (null !== $entity->getID()) {
return sprintf( return sprintf(
'<a href="%s">%s</a>', '<a href="%s">%s</a>',
@ -83,7 +83,7 @@ class EntityColumn extends AbstractColumn
return sprintf('<i>%s</i>', $value); return sprintf('<i>%s</i>', $value);
} }
throw new \InvalidArgumentException('$entity must not be null!'); return '';
}; };
}); });