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; }