Fix invalid geo coordinates if not set

This commit is contained in:
Björn Fromme
2018-09-12 07:46:21 +02:00
parent 781108f46a
commit c833caebc5
@@ -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;
}