[image] we might be generating a link to an image which has not yet been posted

This commit is contained in:
Shish 2024-01-22 22:42:26 +00:00
parent a7c50a0b95
commit 4c6e46b422

View file

@ -211,7 +211,9 @@ class ImageIO extends Extension
$event->replace('$filesize', to_shorthand_int($event->image->filesize));
$event->replace('$filename', $base_fname);
$event->replace('$ext', $event->image->get_ext());
$event->replace('$date', autodate($event->image->posted, false));
if(isset($event->image->posted)) {
$event->replace('$date', autodate($event->image->posted, false));
}
$event->replace("\\n", "\n");
}