From 3694cc0f88b5eb453435165acd84d2e795b9cb32 Mon Sep 17 00:00:00 2001 From: wangxuepeng Date: Tue, 2 Jan 2024 18:55:51 +0800 Subject: [PATCH] * Fix bug #442730. --- module/testcase/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testcase/model.php b/module/testcase/model.php index 4d1b77eaaa..803d2f30fc 100755 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -1216,7 +1216,7 @@ class testcaseModel extends model $filePath = pathinfo($file->pathname, PATHINFO_BASENAME); $datePath = substr($file->pathname, 0, 6); $filePath = $this->app->getAppRoot() . "www/data/upload/{$this->app->company->id}/" . "{$datePath}/" . $filePath; - unlink($filePath); + if(file_exists($filePath)) unlink($filePath); } } if(isset($caseID))