mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +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
|
|
@ -29,7 +29,7 @@ function memberTransImageName($matches)
|
|||
$_tmp = &$GLOBALS['_transImageNameList'][$member_srl];
|
||||
|
||||
// If pre-defined data in the global variables, return it
|
||||
if(!$_tmp->cached)
|
||||
if(!isset($_tmp->cached) || !$_tmp->cached)
|
||||
{
|
||||
$_tmp->cached = true;
|
||||
$image_name_file = sprintf('files/member_extra_info/image_name/%s%d.gif', getNumberingPath($member_srl), $member_srl);
|
||||
|
|
@ -42,6 +42,7 @@ function memberTransImageName($matches)
|
|||
}
|
||||
else
|
||||
{
|
||||
$_tmp->image_name_file = '';
|
||||
$image_name_file = '';
|
||||
}
|
||||
|
||||
|
|
@ -52,6 +53,7 @@ function memberTransImageName($matches)
|
|||
}
|
||||
else
|
||||
{
|
||||
$_tmp->image_mark_file = '';
|
||||
$image_mark_file = '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ function pointLevelIconTrans($matches, $addon_info)
|
|||
return $matches[0];
|
||||
}
|
||||
|
||||
if($addon_info->icon_duplication != 'N')
|
||||
if(!isset($addon_info->icon_duplication) || $addon_info->icon_duplication !== 'N')
|
||||
{
|
||||
// Check Group Image Mark
|
||||
$oMemberModel = getModel('member');
|
||||
|
|
@ -28,21 +28,21 @@ function pointLevelIconTrans($matches, $addon_info)
|
|||
if(!isset($GLOBALS['_pointLevelIcon'][$member_srl]))
|
||||
{
|
||||
// Get point configuration
|
||||
if(!$GLOBALS['_pointConfig'])
|
||||
if(!isset($GLOBALS['_pointConfig']))
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$GLOBALS['_pointConfig'] = $oModuleModel->getModuleConfig('point');
|
||||
$GLOBALS['_pointConfig'] = getModel('module')->getModuleConfig('point') ?? new stdClass;
|
||||
}
|
||||
$config = $GLOBALS['_pointConfig'];
|
||||
|
||||
// Get point model
|
||||
if(!$GLOBALS['_pointModel'])
|
||||
if(!isset($GLOBALS['_pointModel']))
|
||||
{
|
||||
$GLOBALS['_pointModel'] = getModel('point');
|
||||
}
|
||||
$oPointModel = &$GLOBALS['_pointModel'];
|
||||
$oPointModel = $GLOBALS['_pointModel'];
|
||||
|
||||
// Get points
|
||||
$exists = false;
|
||||
$point = $oPointModel->getPoint($member_srl, false, $exists);
|
||||
if(!$exists)
|
||||
{
|
||||
|
|
@ -61,7 +61,7 @@ function pointLevelIconTrans($matches, $addon_info)
|
|||
if($level < $config->max_level)
|
||||
{
|
||||
$next_point = $config->level_step[$level + 1];
|
||||
$present_point = $config->level_step[$level];
|
||||
$present_point = $config->level_step[$level] ?? 0;
|
||||
if($next_point > 0)
|
||||
{
|
||||
$per = (int) (($point - $present_point) / ($next_point - $present_point) * 100);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue