Fix #1452 misc errors in PHP 8.0

This commit is contained in:
Kijin Sung 2020-11-12 14:03:11 +09:00
parent 0f346d8e24
commit 1366bb72ce
4 changed files with 6 additions and 6 deletions

View file

@ -95,10 +95,10 @@ class pointModel extends point
*/
public static function getLevel($point, $level_step)
{
$level_count = count($level_step);
$level_count = count($level_step ?: []);
for ($level = 0; $level <= $level_count; $level++)
{
if ($point < $level_step[$level])
if ($point < $level_step[$level] ?? 0)
{
break;
}