From faa43cb8a62141fb4d87a509f6f4c1be60503369 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Sat, 11 May 2024 12:05:10 +0200 Subject: [PATCH] image.php: do not delete moved images --- inc/image.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/inc/image.php b/inc/image.php index 2429f682..840c9004 100644 --- a/inc/image.php +++ b/inc/image.php @@ -291,6 +291,7 @@ class ImageConvert extends ImageBase { } else { rename($this->temp, $src); chmod($src, 0664); + $this->temp = false; } } public function width() { @@ -300,8 +301,10 @@ class ImageConvert extends ImageBase { return $this->height; } public function destroy() { - @unlink($this->temp); - $this->temp = false; + if ($this->temp !== false) { + @unlink($this->temp); + $this->temp = false; + } } public function resize() { global $config;