修复获取模块信息bug

This commit is contained in:
JaguarJack 2020-06-20 08:51:28 +08:00
parent 49500956dd
commit f21716d5a6

View File

@ -205,8 +205,8 @@ class CatchAdmin
*/ */
public static function getModuleInfo($module) public static function getModuleInfo($module)
{ {
if (file_exists($module . DIRECTORY_SEPARATOR . 'module.json')) { if (file_exists(self::moduleDirectory($module) . DIRECTORY_SEPARATOR . 'module.json')) {
return \json_decode(file_get_contents($module . DIRECTORY_SEPARATOR . 'module.json'), true); return \json_decode(file_get_contents(self::moduleDirectory($module) . DIRECTORY_SEPARATOR . 'module.json'), true);
} }
return []; return [];