修复模块服务发现导致的兼容问题

This commit is contained in:
JaguarJack
2020-06-22 12:36:25 +08:00
parent 51d237d0f0
commit d873ba10f9
3 changed files with 19 additions and 10 deletions

View File

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