From f4eb01463d806e6a85395070d65d12e681da72a6 Mon Sep 17 00:00:00 2001 From: KasuganoSoras Date: Sun, 16 Sep 2018 22:01:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=87=8D=E5=A4=8D=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E6=8F=92=E4=BB=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 人生就是在不断地修复bug... --- include/core/PHPMC/Main.php | 2 +- include/core/PHPMC/Plugin.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/core/PHPMC/Main.php b/include/core/PHPMC/Main.php index 7ba649d..7e7e580 100644 --- a/include/core/PHPMC/Main.php +++ b/include/core/PHPMC/Main.php @@ -1,7 +1,7 @@ Println("Error when load plugin: " . $files . ": No such plugin info file: " . $target . "
" . $data); } + if(stristr($this->plugins, $info['package'] . ";")) { + continue; + } include("{$realpath}/{$file}/{$files}"); + $this->plugin .= $info['package'] . ";"; eval('$' . $info['main'] . ' = new ' . $info['main'] . '();'); eval('$' . $info['main'] . '->onload();'); } else { @@ -36,7 +42,11 @@ class Plugin { if(!$info) { PHPMC::Error()->Println("Error when load plugin: " . $file . ": No such plugin info file: " . $target . "
" . $data); } + if(stristr($this->plugins, $info['package'] . ";")) { + continue; + } include("{$realpath}/{$file}"); + $this->plugin .= $info['package'] . ";"; eval('$' . $info['main'] . ' = new ' . $info['main'] . '();'); eval('$' . $info['main'] . '->onload();'); }