public function hasFlag($flag)
{
- return $this->flags->hasFlag($flag);
+ return ($this->flags != null && $this->flags->hasFlag($flag));
}
public function format(array $format = array())
return true;
}
- require_once 'geocoding.inc.php';
if ($format['requireGeocoding'] || $this->changed == 1) {
$gmapsGeocoder = new GMapsGeocoder();
$gmapsGeocoder->getGeocodedAddress($this);
$mailer->send();
}
}
+ if ($this->countryId == '') {
+ $this->countryId = null;
+ }
$this->geocodeChosen = null;
$this->phones = Phone::formatFormArray($this->phones, $this->error);
return !$this->error;
$this->format();
if (!$this->isEmpty()) {
- require_once 'geocoding.inc.php';
foreach ($areas as $area) {
Geocoder::getAreaId($this, $area);
}