aboutsummaryrefslogtreecommitdiff
path: root/app/class/Media.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/class/Media.php')
-rw-r--r--app/class/Media.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/class/Media.php b/app/class/Media.php
index b08726d..7105830 100644
--- a/app/class/Media.php
+++ b/app/class/Media.php
@@ -265,7 +265,11 @@ class Media extends Item
public function setdate()
{
$timestamp = filemtime($this->getfulldir());
- $this->date = new DateTimeImmutable("@$timestamp");
+ try {
+ $this->date = new DateTimeImmutable("@$timestamp");
+ } catch (\Throwable $th) {
+ $this->date = new DateTimeImmutable();
+ }
}
public function setwidth($width)