From ebe806f7a5835f656a57e1fdcd1040e8b7249a08 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 7 Feb 2021 15:29:28 +0900 Subject: [PATCH] Fix warnings in PHP 8.0 --- modules/comment/comment.item.php | 2 +- modules/document/document.item.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/comment/comment.item.php b/modules/comment/comment.item.php index eebe4771e..1bfce129c 100644 --- a/modules/comment/comment.item.php +++ b/modules/comment/comment.item.php @@ -71,7 +71,7 @@ class commentItem extends BaseObject */ function setAttribute($attribute) { - if(!$attribute->comment_srl) + if(!is_object($attribute) || !$attribute->comment_srl) { $this->comment_srl = NULL; return; diff --git a/modules/document/document.item.php b/modules/document/document.item.php index 983838aa9..99d7d7aa2 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -140,7 +140,7 @@ class documentItem extends BaseObject function setAttribute($attribute, $load_extra_vars = true) { - if(!$attribute->document_srl) + if(!is_object($attribute) || !$attribute->document_srl) { $this->document_srl = null; return;