Fix Address->hasFlag for non-profile addresses
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Sun, 26 Sep 2010 16:26:56 +0000 (18:26 +0200)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Mon, 27 Sep 2010 21:19:19 +0000 (23:19 +0200)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
classes/address.php

index ca1a384..36eac5b 100644 (file)
@@ -135,7 +135,7 @@ class Address
 
     public function hasFlag($flag)
     {
-        return $this->flags->hasFlag($flag);
+        return ($this->flags != null && $this->flags->hasFlag($flag));
     }
 
     public function format(array $format = array())