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()
|
public function getLatitude()
|
||||||
{
|
{
|
||||||
|
if (empty($this->latitude) && $this->region !== null) {
|
||||||
|
return $this->region->getLatitude();
|
||||||
|
}
|
||||||
return $this->latitude;
|
return $this->latitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -473,6 +476,9 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
*/
|
*/
|
||||||
public function getLongitude()
|
public function getLongitude()
|
||||||
{
|
{
|
||||||
|
if (empty($this->longitude) && $this->region !== null) {
|
||||||
|
return $this->region->getLongitude();
|
||||||
|
}
|
||||||
return $this->longitude;
|
return $this->longitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user