Fix warnings in PHP 8.0

This commit is contained in:
Kijin Sung 2020-12-22 22:37:20 +09:00
parent 25a4a3b348
commit 9732290515
2 changed files with 7 additions and 4 deletions

View file

@ -35,8 +35,8 @@ class boardView extends board
{
$this->page_count = $this->module_info->page_count;
}
$this->except_notice = $this->module_info->except_notice == 'N' ? FALSE : TRUE;
$this->include_modules = $this->module_info->include_modules ? explode(',', $this->module_info->include_modules) : [];
$this->except_notice = ($this->module_info->except_notice ?? '') == 'N' ? FALSE : TRUE;
$this->include_modules = ($this->module_info->include_modules ?? []) ? explode(',', $this->module_info->include_modules) : [];
if (count($this->include_modules) && !in_array($this->module_info->module_srl, $this->include_modules))
{
$this->include_modules[] = $this->module_info->module_srl;
@ -546,7 +546,7 @@ class boardView extends board
}
// setup the list count to be serach list count, if the category or search keyword has been set
if($args->category_srl || $args->search_keyword)
if($args->category_srl ?? null || $args->search_keyword ?? null)
{
$args->list_count = $this->search_list_count;
}

View file

@ -707,7 +707,10 @@ class documentModel extends document
// Cleanup of category
$document_category = array();
self::_arrangeCategory($document_category, $menu->list, 0);
if (isset($menu) && isset($menu->list))
{
self::_arrangeCategory($document_category, $menu->list, 0);
}
return $document_category;
}