Skip to content

Commit 99f9a28

Browse files
author
flucout
committed
update
1 parent 4c05974 commit 99f9a28

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/lib/BtPlugins.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ public function get_plugin_list(){
3636
if(empty($result['list']) || empty($result['type'])){
3737
throw new Exception('获取插件列表失败:插件列表为空');
3838
}
39-
foreach($result['list'] as $k=>$v){
40-
if(in_array($v['name'], self::$block_plugins)) unset($result['list'][$k]);
39+
$newlist = [];
40+
foreach($result['list'] as $item){
41+
if(!in_array($item['name'], self::$block_plugins)) $newlist[] = $item;
4142
}
43+
$result['list'] = $newlist;
4244
return $result;
4345
}else{
4446
throw new Exception('获取插件列表失败:'.(isset($result['msg'])?$result['msg']:'面板连接失败'));

0 commit comments

Comments
 (0)