From b93240e1f5aae792e8256dc3817f67a43bb06057 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Sat, 26 Feb 2022 19:20:13 +0200 Subject: [PATCH] Touch fix for PHP 8 --- system/src/Grav/Framework/File/AbstractFile.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/system/src/Grav/Framework/File/AbstractFile.php b/system/src/Grav/Framework/File/AbstractFile.php index c12d46023..3ae70632b 100644 --- a/system/src/Grav/Framework/File/AbstractFile.php +++ b/system/src/Grav/Framework/File/AbstractFile.php @@ -345,6 +345,10 @@ class AbstractFile implements FileInterface */ public function touch(int $mtime = null): bool { + if (null === $mtime) { + return @touch($this->filepath); + } + return @touch($this->filepath, $mtime); }