Fix deprecation warnings for using trim() on null

This commit is contained in:
Kijin Sung 2023-01-16 22:34:26 +09:00
parent 33b58b5e77
commit bdae876529
2 changed files with 7 additions and 7 deletions

View file

@ -324,7 +324,7 @@ class CommentItem extends BaseObject
function isExistsHomepage()
{
if(trim($this->get('homepage')))
if(trim($this->get('homepage') ?? ''))
{
return TRUE;
}
@ -334,7 +334,7 @@ class CommentItem extends BaseObject
function getHomepageUrl()
{
$url = trim($this->get('homepage'));
$url = trim($this->get('homepage') ?? '');
if(!$url)
{
return;