From f785026289f486921cfa6896b1da1f9255d27de3 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 9 May 2022 08:47:02 +0000 Subject: [PATCH] Don't return a filename when it wasn't stored --- src/Contact/Avatar.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Contact/Avatar.php b/src/Contact/Avatar.php index 4a54833b0c..6114788021 100644 --- a/src/Contact/Avatar.php +++ b/src/Contact/Avatar.php @@ -124,6 +124,11 @@ class Avatar DI::profiler()->stopRecording(); + if (!file_exists($filepath)) { + Logger::notice('Avatar cache file could not be stored', ['file' => $filepath]); + return ''; + } + return DI::baseUrl() . $path; }