From a79c687195885f61f3cb845c674e2de9baeec434 Mon Sep 17 00:00:00 2001 From: Devil Date: Wed, 17 Mar 2021 12:16:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=A9=BA=E9=85=8D=E7=BD=AE=E6=95=B0=E7=BB=84?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E9=94=99=E8=AF=AF=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/service/AppMiniService.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/application/service/AppMiniService.php b/application/service/AppMiniService.php index 7c01a4813..419bf5c4d 100755 --- a/application/service/AppMiniService.php +++ b/application/service/AppMiniService.php @@ -570,6 +570,14 @@ class AppMiniService // 配置信息 $file = $new_dir.DS.'app.json'; $config = json_decode(file_get_contents($file), true); + + // 插件配置为空防止成为数组 + if(array_key_exists('plugins', $config) && empty($config['plugins'])) + { + $config['plugins'] = (object) []; + } + + // 历史信息 if(empty($config['history'])) { $config['history'] = [];