mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-25 07:03:41 +00:00
An additional check to prevent PHP-notices that might corrupt the image data
This commit is contained in:
parent
a30ee1587f
commit
d233ccbcc7
1 changed files with 1 additions and 1 deletions
|
@ -137,7 +137,7 @@ function privacy_image_cache_init() {
|
|||
}
|
||||
|
||||
// Writing in cachefile
|
||||
if (isset($cachefile) && ($cachefile != '') and (exif_imagetype($cachefile) > 0))
|
||||
if (isset($cachefile) && ($cachefile != '') and (file_exists($cachefile)) and (exif_imagetype($cachefile) > 0))
|
||||
file_put_contents($cachefile, $img_str);
|
||||
|
||||
header("Content-type: $mime");
|
||||
|
|
Loading…
Reference in a new issue