check for empty word after trim

This commit is contained in:
redmatrix 2015-09-12 14:37:55 -07:00
parent 692e117c8a
commit df0fa9883c

View File

@ -3441,6 +3441,8 @@ function post_is_importable($item,$abook) {
if($exclude) {
foreach($exclude as $word) {
$word = trim($word);
if(! $word)
continue;
if(substr($word,0,1) === '#' && $tags) {
foreach($tags as $t)
if(($t['type'] == TERM_HASHTAG) && (($t['term'] === substr($word,1)) || (substr($word,1) === '*')))
@ -3460,6 +3462,8 @@ function post_is_importable($item,$abook) {
if($include) {
foreach($include as $word) {
$word = trim($word);
if(! $word)
continue;
if(substr($word,0,1) === '#' && $tags) {
foreach($tags as $t)
if(($t['type'] == TERM_HASHTAG) && (($t['term'] === substr($word,1)) || (substr($word,1) === '*')))