import a file config, check if it is a object and run clone

This commit is contained in:
BJRambo 2020-06-17 14:56:57 +09:00
parent 3e4a96eb17
commit ea381a46c6

View file

@ -284,7 +284,9 @@ class fileModel extends file
function getFileConfig($module_srl = null)
{
$oModuleModel = getModel('module');
$config = clone $oModuleModel->getModuleConfig('file');
$config = $oModuleModel->getModuleConfig('file');
$config = is_object($config) ? clone $config : new stdClass();
if($module_srl)
{
$module_config = $oModuleModel->getModulePartConfig('file', $module_srl);