]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
fix problems with blank tag strings (!)
authorEvan Prodromou <evan@controlyourself.ca>
Tue, 25 Nov 2008 00:05:56 +0000 (19:05 -0500)
committerEvan Prodromou <evan@controlyourself.ca>
Tue, 25 Nov 2008 00:05:56 +0000 (19:05 -0500)
darcs-hash:20081125000556-5ed1f-d19f3a1e723695122a8e75fb881846bcbc48ebda.gz

actions/profilesettings.php

index 1e67fb172d7802d98de518b8d7d57c6b72852cc8..47064c7c398ffc88dc1253f23e8bc1eb12242f67 100644 (file)
@@ -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));