aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-12 14:37:55 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-12 14:37:55 -0700
commitdf0fa9883cad7c907cce5ece1baeacb61bddc15e (patch)
tree50b90ac246a4da1752ec31fd68f763568e7ac10a /include/items.php
parent692e117c8a2a6e3830c6ff71486b4c1edc5226c9 (diff)
downloadvolse-hubzilla-df0fa9883cad7c907cce5ece1baeacb61bddc15e.tar.gz
volse-hubzilla-df0fa9883cad7c907cce5ece1baeacb61bddc15e.tar.bz2
volse-hubzilla-df0fa9883cad7c907cce5ece1baeacb61bddc15e.zip
check for empty word after trim
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 28fd8502b..657168601 100755
--- a/include/items.php
+++ b/include/items.php
@@ -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) === '*')))