Fix various warnings in PHP 8.0

This commit is contained in:
Kijin Sung 2021-01-08 00:27:00 +09:00
parent db6f44a913
commit 4dcdb9e4bd
5 changed files with 10 additions and 5 deletions

View file

@ -2293,7 +2293,7 @@ class Context
$plugin_name = 'ui'; $plugin_name = 'ui';
} }
if($loaded_plugins[$plugin_name]) if(isset($loaded_plugins[$plugin_name]))
{ {
return; return;
} }

View file

@ -1355,7 +1355,7 @@ class documentController extends document
$oDB->commit(); $oDB->commit();
// Register session // Register session
if(!$_SESSION['banned_document'][$document_srl] && Context::getSessionStatus()) if(!isset($_SESSION['readed_document'][$document_srl]) && Context::getSessionStatus())
{ {
$_SESSION['readed_document'][$document_srl] = true; $_SESSION['readed_document'][$document_srl] = true;
} }

View file

@ -30,6 +30,11 @@ class documentItem extends BaseObject
* @var bool * @var bool
*/ */
var $allow_trackback_status = null; var $allow_trackback_status = null;
/**
* Comment page navigation
* @var object
*/
var $comment_page_navigation = null;
/** /**
* column list * column list
* @var array * @var array
@ -1459,7 +1464,7 @@ class documentItem extends BaseObject
if(!isset($GLOBALS['__member_signature_max_height'])) if(!isset($GLOBALS['__member_signature_max_height']))
{ {
$member_config = ModuleModel::getModuleConfig('member'); $member_config = ModuleModel::getModuleConfig('member');
$GLOBALS['__member_signature_max_height'] = $member_config->signature_max_height; $GLOBALS['__member_signature_max_height'] = $member_config->signature_max_height ?? 100;
} }
if($signature) if($signature)
{ {

View file

@ -1307,7 +1307,7 @@ class documentModel extends document
$args->page_count = $searchOpt->page_count ?? 10; $args->page_count = $searchOpt->page_count ?? 10;
$args->start_date = $searchOpt->start_date ?? null; $args->start_date = $searchOpt->start_date ?? null;
$args->end_date = $searchOpt->end_date ?? null; $args->end_date = $searchOpt->end_date ?? null;
$args->s_is_notice = $searchOpt->except_notice ? 'N' : null; $args->s_is_notice = ($searchOpt->except_notice ?? false) ? 'N' : null;
$args->statusList = $searchOpt->statusList ?? array(self::getConfigStatus('public'), self::getConfigStatus('secret')); $args->statusList = $searchOpt->statusList ?? array(self::getConfigStatus('public'), self::getConfigStatus('secret'));
$args->columnList = $searchOpt->columnList ?? array(); $args->columnList = $searchOpt->columnList ?? array();

View file

@ -262,7 +262,7 @@ class editorModel extends editor
Context::set('files_count', (int)$files_count); Context::set('files_count', (int)$files_count);
// Check an option whether to start the editor manually. // Check an option whether to start the editor manually.
Context::set('editor_manual_start', $option->manual_start); Context::set('editor_manual_start', $option->manual_start ?? null);
// Compile and return the editor skin template. // Compile and return the editor skin template.
$tpl_path = Context::get('editor_path'); $tpl_path = Context::get('editor_path');