From a3eafecde5c4c627e708e0e4251e6c9899c3e833 Mon Sep 17 00:00:00 2001 From: flucont Date: Sat, 4 Jun 2022 23:49:34 +0800 Subject: [PATCH] fix unlink --- app/lib/Plugins.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/Plugins.php b/app/lib/Plugins.php index 1775695..f51d04b 100644 --- a/app/lib/Plugins.php +++ b/app/lib/Plugins.php @@ -183,7 +183,7 @@ class Plugins self::download_file($btapi, $filename, $filepath); if(file_exists($filepath)){ if($filemd5 && md5_file($filepath) != $filemd5){ - unlink($filepath); + @unlink($filepath); throw new Exception('插件文件MD5校验失败'); } return true; @@ -203,7 +203,7 @@ class Plugins try{ $btapi->download($filename, $filepath); }catch(Exception $e){ - unlink($filepath); + @unlink($filepath); //宝塔bug小文件下载失败,改用base64下载 $result = $btapi->get_file($filename); if($result && isset($result['status']) && $result['status']==true){