From: Michael Date: Mon, 9 May 2022 08:47:02 +0000 (+0000) Subject: Don't return a filename when it wasn't stored X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f785026289f486921cfa6896b1da1f9255d27de3;p=friendica.git Don't return a filename when it wasn't stored --- 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; }