From 6f1bb7700d0424fd522ce808c3b30305c75806b8 Mon Sep 17 00:00:00 2001 From: blackcoder87 Date: Wed, 1 Jan 2025 17:15:11 +0100 Subject: [PATCH] Fix "file_exists(): Passing null to parameter of type string is deprecated" (#1148) --- application/modules/events/config/config.php | 2 +- application/modules/events/mappers/Events.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/modules/events/config/config.php b/application/modules/events/config/config.php index 85025b81c..a72d5a0e4 100644 --- a/application/modules/events/config/config.php +++ b/application/modules/events/config/config.php @@ -13,7 +13,7 @@ class Config extends \Ilch\Config\Install { public $config = [ 'key' => 'events', - 'version' => '1.23.3', + 'version' => '1.23.4', 'icon_small' => 'fa-solid fa-ticket', 'author' => 'Veldscholten, Kevin', 'link' => 'https://ilch.de', diff --git a/application/modules/events/mappers/Events.php b/application/modules/events/mappers/Events.php index f7ad3d580..086920ca5 100644 --- a/application/modules/events/mappers/Events.php +++ b/application/modules/events/mappers/Events.php @@ -382,7 +382,7 @@ public function delete(int $id) ->execute() ->fetchAssoc(); - if (file_exists($imageRow['image'])) { + if (isset($imageRow['image']) && file_exists($imageRow['image'])) { unlink($imageRow['image']); }