Don't allow empty flags.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 17 Sep 2010 12:34:44 +0000 (14:34 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 17 Sep 2010 12:35:14 +0000 (14:35 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/plflagset.php

index e18adcf..94bd855 100644 (file)
@@ -39,7 +39,9 @@ class PlFlagSet
         $this->sep = $sep;
         $splitted = explode($sep, $flags);
         foreach ($splitted as $part) {
-            $this->values[$part] = true;
+            if (!empty($part)) {
+                $this->values[$part] = true;
+            }
         }
     }