mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Fix deprecation warnings for using trim() on null
This commit is contained in:
parent
33b58b5e77
commit
bdae876529
2 changed files with 7 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -440,17 +440,17 @@ class DocumentItem extends BaseObject
|
|||
return $this->get('ipaddress');
|
||||
}
|
||||
|
||||
return '*' . strstr($this->get('ipaddress'), '.');
|
||||
return '*' . strstr($this->get('ipaddress') ?? '', '.');
|
||||
}
|
||||
|
||||
function isExistsHomepage()
|
||||
{
|
||||
return (bool) trim($this->get('homepage'));
|
||||
return (bool) trim($this->get('homepage') ?? '');
|
||||
}
|
||||
|
||||
function getHomepageUrl()
|
||||
{
|
||||
if(!$url = trim($this->get('homepage')))
|
||||
if(!$url = trim($this->get('homepage') ?? ''))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -594,7 +594,7 @@ class DocumentItem extends BaseObject
|
|||
}
|
||||
|
||||
$title = escape($this->getTitleText($cut_size, $tail), false);
|
||||
$this->add('title_color', trim($this->get('title_color')));
|
||||
$this->add('title_color', trim($this->get('title_color') ?? ''));
|
||||
|
||||
$attrs = array();
|
||||
if($this->get('title_bold') == 'Y')
|
||||
|
|
@ -603,7 +603,7 @@ class DocumentItem extends BaseObject
|
|||
}
|
||||
if($this->get('title_color') && $this->get('title_color') != 'N')
|
||||
{
|
||||
$attrs[] = 'color:#' . ltrim($this->get('title_color'), '#');
|
||||
$attrs[] = 'color:#' . ltrim($this->get('title_color') ?? '', '#');
|
||||
}
|
||||
if(count($attrs))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue