mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-10 09:18:33 +01:00
Do not throw an exception during rendering of log detail page, if element has no time travel URL
This commit is contained in:
@@ -106,7 +106,7 @@ class EntityURLGenerator
|
||||
/**
|
||||
* Gets the URL to view the given element at a given timestamp.
|
||||
*/
|
||||
public function timeTravelURL(AbstractDBElement $entity, DateTime $dateTime): string
|
||||
public function timeTravelURL(AbstractDBElement $entity, \DateTimeInterface $dateTime): string
|
||||
{
|
||||
$map = [
|
||||
Part::class => 'part_info',
|
||||
@@ -161,7 +161,7 @@ class EntityURLGenerator
|
||||
}
|
||||
|
||||
//Otherwise throw an error
|
||||
throw new EntityNotSupportedException('The given entity is not supported yet!');
|
||||
throw new EntityNotSupportedException('The given entity is not supported yet! Passed class type: '.get_class($entity));
|
||||
}
|
||||
|
||||
public function viewURL(Attachment $entity): string
|
||||
|
||||
Reference in New Issue
Block a user