mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 17:44:38 +09:00
Fix #1502 error in PHP 8.0 if there are no module categories
This commit is contained in:
parent
6754303189
commit
824d0c5ae9
2 changed files with 5 additions and 1 deletions
|
|
@ -125,6 +125,10 @@ class moduleAdminView extends module
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$category_list = $oModuleModel->getModuleCategories();
|
$category_list = $oModuleModel->getModuleCategories();
|
||||||
|
if (!is_array($category_list))
|
||||||
|
{
|
||||||
|
return $category_list;
|
||||||
|
}
|
||||||
Context::set('category_list', $category_list);
|
Context::set('category_list', $category_list);
|
||||||
|
|
||||||
//Security
|
//Security
|
||||||
|
|
|
||||||
|
|
@ -1314,7 +1314,7 @@ class moduleModel extends module
|
||||||
$output = executeQuery('module.getModuleCategories', $args);
|
$output = executeQuery('module.getModuleCategories', $args);
|
||||||
if(!$output->toBool()) return $output;
|
if(!$output->toBool()) return $output;
|
||||||
$list = $output->data;
|
$list = $output->data;
|
||||||
if(!$list) return;
|
if(!$list) return array();
|
||||||
if(!is_array($list)) $list = array($list);
|
if(!is_array($list)) $list = array($list);
|
||||||
|
|
||||||
foreach($list as $val)
|
foreach($list as $val)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue