Fix invalid geo coordinates if not set
This commit is contained in:
@@ -457,6 +457,9 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
||||
*/
|
||||
public function getLatitude()
|
||||
{
|
||||
if (empty($this->latitude) && $this->region !== null) {
|
||||
return $this->region->getLatitude();
|
||||
}
|
||||
return $this->latitude;
|
||||
}
|
||||
|
||||
@@ -473,6 +476,9 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
||||
*/
|
||||
public function getLongitude()
|
||||
{
|
||||
if (empty($this->longitude) && $this->region !== null) {
|
||||
return $this->region->getLongitude();
|
||||
}
|
||||
return $this->longitude;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user