Fix deprecation warnings in PHP 8.2

This commit is contained in:
Kijin Sung 2023-05-01 00:05:56 +09:00
parent a1bd9cc2bc
commit 581097a9e3
3 changed files with 14 additions and 14 deletions

View file

@ -864,7 +864,7 @@ class DocumentItem extends BaseObject
public function getTags()
{
$tag_list = array_map(function($str) { return escape(utf8_trim($str), false); }, explode(',', $this->get('tags')));
$tag_list = array_map(function($str) { return escape(utf8_trim($str), false); }, explode(',', $this->get('tags') ?? ''));
$tag_list = array_filter($tag_list, function($str) { return $str !== ''; });
return array_unique($tag_list);
}