Do not throw an exception during rendering of log detail page, if element has no time travel URL

This commit is contained in:
Jan Böhmer 2023-06-06 23:15:14 +02:00
parent e68827bf3b
commit efc152e3c8
3 changed files with 18 additions and 5 deletions

View file

@ -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