diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2020-04-28 20:18:17 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2020-04-28 20:24:52 +0200 |
commit | 9090550d241f9f7b3246b24bfd323bd988add749 (patch) | |
tree | 2c2de66510533da53848dd876a9ab392471b38b8 /app/class/Media.php | |
parent | 98514a4e0037aa0879e45bbad660aeda8837c624 (diff) | |
download | wcms-9090550d241f9f7b3246b24bfd323bd988add749.tar.gz wcms-9090550d241f9f7b3246b24bfd323bd988add749.zip |
listen to brother Stan and clean some things
Diffstat (limited to 'app/class/Media.php')
-rw-r--r-- | app/class/Media.php | 6 |
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) |