From 5a670f71f6a6bdaa880950302a73b1ef35a6ae2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 2 Feb 2020 13:11:17 +0100 Subject: [PATCH] Fixed exception on table. --- src/DataTables/Column/EntityColumn.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DataTables/Column/EntityColumn.php b/src/DataTables/Column/EntityColumn.php index f9ec159d..fa0e9749 100644 --- a/src/DataTables/Column/EntityColumn.php +++ b/src/DataTables/Column/EntityColumn.php @@ -72,7 +72,7 @@ class EntityColumn extends AbstractColumn /** @var AbstractDBElement|null $entity */ $entity = $this->accessor->getValue($context, $options['property']); - if ($entity) { + if ($entity !== null) { if (null !== $entity->getID()) { return sprintf( '%s', @@ -83,7 +83,7 @@ class EntityColumn extends AbstractColumn return sprintf('%s', $value); } - throw new \InvalidArgumentException('$entity must not be null!'); + return ''; }; });