mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Return early if $module does not contain a proper module name #2360
This commit is contained in:
parent
900dbac09b
commit
bdace357ea
1 changed files with 10 additions and 0 deletions
|
|
@ -1248,6 +1248,11 @@ class ModuleModel extends Module
|
||||||
*/
|
*/
|
||||||
public static function getModuleConfig($module)
|
public static function getModuleConfig($module)
|
||||||
{
|
{
|
||||||
|
if (!$module || !is_scalar($module))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if(!isset($GLOBALS['__ModuleConfig__'][$module]))
|
if(!isset($GLOBALS['__ModuleConfig__'][$module]))
|
||||||
{
|
{
|
||||||
$config = Rhymix\Framework\Cache::get('site_and_module:module_config:' . $module);
|
$config = Rhymix\Framework\Cache::get('site_and_module:module_config:' . $module);
|
||||||
|
|
@ -1301,6 +1306,11 @@ class ModuleModel extends Module
|
||||||
*/
|
*/
|
||||||
public static function getModulePartConfig($module, $module_srl)
|
public static function getModulePartConfig($module, $module_srl)
|
||||||
{
|
{
|
||||||
|
if (!$module || !is_scalar($module) || !$module_srl || !is_scalar($module_srl))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if(!isset($GLOBALS['__ModulePartConfig__'][$module][$module_srl]))
|
if(!isset($GLOBALS['__ModulePartConfig__'][$module][$module_srl]))
|
||||||
{
|
{
|
||||||
$config = Rhymix\Framework\Cache::get('site_and_module:module_part_config:' . $module . '_' . $module_srl);
|
$config = Rhymix\Framework\Cache::get('site_and_module:module_part_config:' . $module . '_' . $module_srl);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue