- message_die(GENERAL_ERROR, "Can't check if a local place exists yet.", "GeoLocation exists method", __LINE__, __FILE__);
+ if (!isset($place)) {
+ message_die(GENERAL_ERROR, "Can't check if a local place exists for the following location: " . $this->data[0], "GeoLocation exists method", __LINE__, __FILE__);
+ }
+ if (!$place->is_valid_local_location($this->data[1])) {
+ return false;
+ }
}
return true;
}
/*
* Checks if the place is equals at the specified expression or place
*
* @return boolean true if the places are equals ; otherwise, false
*/
function equals ($expression) {
//Are global location equals?
//TODO: creates a better set of rules to define when 2 locations are equa l.
if (is_a($expression, 'GeoLocation')) {
if (!$this->equals($expression->data[0])) {
return false;
}
if (count($expression->data) + count($this->data) > 2) {