fix: add guard against whitespace-only entries from messing up tag search
This commit is contained in:
parent
c877c8ce31
commit
02054d418d
1 changed files with 6 additions and 1 deletions
|
@ -22,7 +22,12 @@ function _str_to_raw_taglist($taglist) {
|
||||||
$split_list = explode(' ', $taglist);
|
$split_list = explode(' ', $taglist);
|
||||||
|
|
||||||
$split_list = array_filter($split_list, function($entry) {
|
$split_list = array_filter($split_list, function($entry) {
|
||||||
return !preg_match('/^\s*$/', $entry);
|
if(strlen($entry) == 0)
|
||||||
|
return false;
|
||||||
|
if(preg_match('/^\s*$/', $entry))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
return $split_list;
|
return $split_list;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue