From 9a48186d35a94bd88ca538f4d7ba6c8cf627c9d0 Mon Sep 17 00:00:00 2001 From: Ying Date: Tue, 29 Nov 2022 13:59:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=9D=99=E6=80=81=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/system/Plugin.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/admin/controller/system/Plugin.php b/app/admin/controller/system/Plugin.php index 1b1c167..49a5157 100644 --- a/app/admin/controller/system/Plugin.php +++ b/app/admin/controller/system/Plugin.php @@ -44,7 +44,7 @@ class Plugin extends AdminController * 错误信息 * @var mixed */ - static mixed $errData; + static mixed $ServerBody = ''; /** * 获取本地插件列表 @@ -93,7 +93,7 @@ class Plugin extends AdminController self::enabled($name); } catch (\Throwable $th) { recursive_delete($pluginPath); - return $this->error($th->getMessage(), null, self::$errData, $th->getCode()); + return $this->error($th->getMessage(), null, self::$ServerBody, $th->getCode()); } return $this->success('插件安装成功', null, get_plugin_config($name, true)); @@ -187,7 +187,7 @@ class Plugin extends AdminController self::executeSql($name); self::enabled($name); } catch (\Throwable $th) { - return $this->error($th->getMessage(), null, self::$errData, $th->getCode()); + return $this->error($th->getMessage(), null, self::$ServerBody, $th->getCode()); } return $this->success('插件更新成功', null, $data); @@ -339,7 +339,7 @@ class Plugin extends AdminController $filePath = plugin_path() . $name . '.zip'; write_file($filePath, $content); } else { - self::$errData = $body['data']; + self::$ServerBody = $body['data']; throw new \Exception($body['msg'], $body['code']); }