summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2008-11-24 19:05:56 -0500
committerEvan Prodromou <evan@controlyourself.ca>2008-11-24 19:05:56 -0500
commitfb312a9de9f593db904570e505fba659d00fe4fe (patch)
treea44ba694fa3d4ce319e3c7d29e8ea99287c59446
parent6d355a9d60e48fdf577ff4a8a5504d99863579c3 (diff)
fix problems with blank tag strings (!)
darcs-hash:20081125000556-5ed1f-d19f3a1e723695122a8e75fb881846bcbc48ebda.gz
-rw-r--r--actions/profilesettings.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/actions/profilesettings.php b/actions/profilesettings.php
index 1e67fb172..47064c7c3 100644
--- a/actions/profilesettings.php
+++ b/actions/profilesettings.php
@@ -232,8 +232,12 @@ class ProfilesettingsAction extends SettingsAction {
return;
}
- $tags = array_map('common_canonical_tag', preg_split('/[\s,]+/', $tagstring));
-
+ if ($tagstring) {
+ $tags = array_map('common_canonical_tag', preg_split('/[\s,]+/', $tagstring));
+ } else {
+ $tags = array();
+ }
+
foreach ($tags as $tag) {
if (!common_valid_profile_tag($tag)) {
$this->show_form(sprintf(_('Invalid tag: "%s"'), $tag));