mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Fix #2276 warning/notice when $obj doesn't have all the expected attributes
This commit is contained in:
parent
40b3dcd5f0
commit
07e252d2ac
1 changed files with 7 additions and 7 deletions
|
|
@ -829,9 +829,9 @@ class CommentModel extends Comment
|
|||
// Variables
|
||||
$args = new stdClass();
|
||||
$args->sort_index = 'comments.list_order';
|
||||
$args->page = $obj->page ? $obj->page : 1;
|
||||
$args->list_count = $obj->list_count ? $obj->list_count : 20;
|
||||
$args->page_count = $obj->page_count ? $obj->page_count : 10;
|
||||
$args->page = $obj->page ?? 1;
|
||||
$args->list_count = $obj->list_count ?? 20;
|
||||
$args->page_count = $obj->page_count ?? 10;
|
||||
$args->s_member_srl = $obj->member_srl ?? null;
|
||||
$args->s_module_srl = $obj->module_srl ?? null;
|
||||
$args->exclude_module_srl = $obj->exclude_module_srl ?? null;
|
||||
|
|
@ -843,8 +843,8 @@ class CommentModel extends Comment
|
|||
}
|
||||
|
||||
// check if module is using comment validation system
|
||||
$oCommentController = getController("comment");
|
||||
$is_using_validation = $oCommentController->isModuleUsingPublishValidation($obj->module_srl);
|
||||
$oCommentController = CommentController::getInstance();
|
||||
$is_using_validation = $oCommentController->isModuleUsingPublishValidation($args->s_module_srl);
|
||||
if($is_using_validation)
|
||||
{
|
||||
$args->s_is_published = 1;
|
||||
|
|
@ -1002,8 +1002,8 @@ class CommentModel extends Comment
|
|||
|
||||
// Variables
|
||||
$args = new stdClass();
|
||||
$args->s_module_srl = $obj->module_srl;
|
||||
$args->exclude_module_srl = $obj->exclude_module_srl;
|
||||
$args->s_module_srl = $obj->module_srl ?? null;
|
||||
$args->exclude_module_srl = $obj->exclude_module_srl ?? null;
|
||||
$args->statusList = $obj->statusList ?? null;
|
||||
if (isset($obj->is_secret) && $obj->is_secret)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue