mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Fixed exception on table.
This commit is contained in:
parent
6369ee2e61
commit
5a670f71f6
1 changed files with 2 additions and 2 deletions
|
@ -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 '';
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue