mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 00:02:21 +09:00
Various fixes to remove warnings in PHP 8.0
This commit is contained in:
parent
9a0bf6d907
commit
49923844b2
36 changed files with 271 additions and 176 deletions
|
|
@ -879,7 +879,7 @@ class moduleAdminController extends module
|
|||
$lang_supported = Context::loadLangSelected();
|
||||
$defaultLang = config('locale.default_lang');
|
||||
|
||||
if(!is_array($langMap[$defaultLang]))
|
||||
if(!isset($langMap[$defaultLang]) || !is_array($langMap[$defaultLang]))
|
||||
{
|
||||
$langMap[$defaultLang] = array();
|
||||
}
|
||||
|
|
@ -899,7 +899,7 @@ class moduleAdminController extends module
|
|||
continue;
|
||||
}
|
||||
|
||||
if(!is_array($langMap[$targetLangCode]))
|
||||
if(!isset($langMap[$targetLangCode]) || !is_array($langMap[$targetLangCode]))
|
||||
{
|
||||
$langMap[$targetLangCode] = array();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -442,7 +442,9 @@ class moduleAdminModel extends module
|
|||
if(is_array($lang_supported))
|
||||
{
|
||||
foreach($lang_supported as $key => $val)
|
||||
$output[$key] = $selected_lang[$key]?$selected_lang[$key]:$name;
|
||||
{
|
||||
$output[$key] = (isset($selected_lang[$key]) && $selected_lang[$key]) ? $selected_lang[$key] : $name;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1209,7 +1209,7 @@ class moduleModel extends module
|
|||
$output = executeQuery('module.getModuleConfig', $args);
|
||||
|
||||
// Only object type
|
||||
if($output->data->config)
|
||||
if(isset($output->data->config) && $output->data->config)
|
||||
{
|
||||
$config = unserialize($output->data->config);
|
||||
}
|
||||
|
|
@ -1363,7 +1363,7 @@ class moduleModel extends module
|
|||
$info->created_table_count = null; //$created_table_count;
|
||||
$info->table_count = null; //$table_count;
|
||||
$info->path = $path;
|
||||
$info->admin_index_act = $info->admin_index_act;
|
||||
$info->admin_index_act = $info->admin_index_act ?? null;
|
||||
$list[] = $info;
|
||||
}
|
||||
return $list;
|
||||
|
|
@ -1466,7 +1466,7 @@ class moduleModel extends module
|
|||
$info->created_table_count = $created_table_count;
|
||||
$info->table_count = $table_count;
|
||||
$info->path = $path;
|
||||
$info->admin_index_act = $info->admin_index_act;
|
||||
$info->admin_index_act = $info->admin_index_act ?? null;
|
||||
|
||||
if(!Context::isBlacklistedPlugin($module_name))
|
||||
{
|
||||
|
|
@ -1491,7 +1491,7 @@ class moduleModel extends module
|
|||
// Check if all action-forwardable routes are registered
|
||||
$module_action_info = self::getModuleActionXml($module_name);
|
||||
$forwardable_routes = array();
|
||||
foreach ($module_action_info->action ?: [] as $action_name => $action_info)
|
||||
foreach ($module_action_info->action ?? [] as $action_name => $action_info)
|
||||
{
|
||||
if (count($action_info->route) && $action_info->standalone !== 'false')
|
||||
{
|
||||
|
|
@ -1501,14 +1501,14 @@ class moduleModel extends module
|
|||
);
|
||||
}
|
||||
}
|
||||
foreach ($module_action_info->route->GET ?: [] as $regexp => $action_name)
|
||||
foreach ($module_action_info->route->GET ?? [] as $regexp => $action_name)
|
||||
{
|
||||
if (isset($forwardable_routes[$action_name]))
|
||||
{
|
||||
$forwardable_routes[$action_name]['regexp'][] = ['GET', $regexp];
|
||||
}
|
||||
}
|
||||
foreach ($module_action_info->route->POST ?: [] as $regexp => $action_name)
|
||||
foreach ($module_action_info->route->POST ?? [] as $regexp => $action_name)
|
||||
{
|
||||
if (isset($forwardable_routes[$action_name]))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue