whitespace and fixup problem with blank string

darcs-hash:20081124150638-5ed1f-994af62567660c7f09985bf449a344df104548eb.gz
This commit is contained in:
Evan Prodromou 2008-11-24 10:06:38 -05:00
parent 07c4547a2f
commit 138b1b2767

View File

@ -121,7 +121,10 @@ class TagotherAction extends Action {
return;
}
$tags = array_map('common_canonical_tag', preg_split('/[\s,]+/', $tagstring));
if (is_string($tagstring) && strlen($tagstring) > 0) {
$tags = array_map('common_canonical_tag',
preg_split('/[\s,]+/', $tagstring));
foreach ($tags as $tag) {
if (!common_valid_profile_tag($tag)) {
@ -129,6 +132,9 @@ class TagotherAction extends Action {
return;
}
}
} else {
$tags = array();
}
$user = common_current_user();