]> git.mxchange.org Git - friendica.git/commitdiff
Don't return a filename when it wasn't stored
authorMichael <heluecht@pirati.ca>
Mon, 9 May 2022 08:47:02 +0000 (08:47 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 9 May 2022 08:47:02 +0000 (08:47 +0000)
src/Contact/Avatar.php

index 4a54833b0c8d37d06dab59a24c962187fa660022..6114788021f0a5f94d67d154178a25fd26193d45 100644 (file)
@@ -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;
        }