From 9090550d241f9f7b3246b24bfd323bd988add749 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Tue, 28 Apr 2020 20:18:17 +0200 Subject: listen to brother Stan and clean some things --- app/class/Media.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/class/Media.php') 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) -- cgit v1.2.3