From 79c143c9a44d750bed86a6684405fd611d19d802 Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Mon, 23 Dec 2024 21:26:45 +0100 Subject: [PATCH] fix: twig filter `exif_read_data` throws critical error --- system/src/Grav/Common/Twig/Extension/FilesystemExtension.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/src/Grav/Common/Twig/Extension/FilesystemExtension.php b/system/src/Grav/Common/Twig/Extension/FilesystemExtension.php index cbafdb246..b5d8ccc6c 100644 --- a/system/src/Grav/Common/Twig/Extension/FilesystemExtension.php +++ b/system/src/Grav/Common/Twig/Extension/FilesystemExtension.php @@ -272,13 +272,13 @@ public function getimagesize($filename) * @param bool $read_thumbnail * @return array|false */ - public function exif_read_data($filename, ?string $required_sections, bool $as_arrays = false, bool $read_thumbnail = false) + public function exif_read_data($filename, ?string $required_sections = null, bool $as_arrays = false, bool $read_thumbnail = false) { if (!Utils::functionExists('exif_read_data') || !$this->checkFilename($filename)) { return false; } - return exif_read_data($filename, $required_sections, $as_arrays, $read_thumbnail); + return @exif_read_data($filename, $required_sections, $as_arrays, $read_thumbnail); } /**