From e49a6e06a8cf6043f0eb25cd3276a59eed50a7c8 Mon Sep 17 00:00:00 2001 From: 3D-I Date: Sun, 28 Mar 2021 21:34:13 +0200 Subject: [PATCH] [ticket/16743] Properly check if TMP file exists - PHP 8 PHPBB3-16743 --- phpBB/phpbb/files/filespec.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/phpBB/phpbb/files/filespec.php b/phpBB/phpbb/files/filespec.php index d6d753024b..59c7948d1f 100644 --- a/phpBB/phpbb/files/filespec.php +++ b/phpBB/phpbb/files/filespec.php @@ -476,7 +476,10 @@ class filespec } // Remove temporary filename - @unlink($this->filename); + if (file_exists($this->filename)) + { + @unlink($this->filename); + } if (count($this->error)) {