mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Change ModuleModel::getModuleConfig() to return null if no config exists
This commit is contained in:
parent
3f9d406f8d
commit
c087121262
1 changed files with 4 additions and 3 deletions
|
|
@ -1393,7 +1393,7 @@ class moduleModel extends module
|
|||
*
|
||||
* @param string $module
|
||||
* @param int $site_srl @deprecated
|
||||
* @return object
|
||||
* @return mixed
|
||||
*/
|
||||
function getModuleConfig($module, $site_srl = 0)
|
||||
{
|
||||
|
|
@ -1414,7 +1414,7 @@ class moduleModel extends module
|
|||
}
|
||||
else
|
||||
{
|
||||
$config = new stdClass;
|
||||
$config = -1; // Use -1 as a temporary value because null cannot be cached
|
||||
}
|
||||
|
||||
// Set cache
|
||||
|
|
@ -1426,7 +1426,8 @@ class moduleModel extends module
|
|||
$GLOBALS['__ModuleConfig__'][$site_srl][$module] = $config;
|
||||
}
|
||||
|
||||
return $GLOBALS['__ModuleConfig__'][$site_srl][$module];
|
||||
$config = $GLOBALS['__ModuleConfig__'][$site_srl][$module];
|
||||
return $config === -1 ? null : $config;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue