fix: avoid null pointer exceptions
This commit is contained in:
@@ -125,7 +125,7 @@ class City extends AbstractDestination implements TeaserInterface
|
|||||||
{
|
{
|
||||||
$headerImages = $this->headerImages;
|
$headerImages = $this->headerImages;
|
||||||
|
|
||||||
if ($headerImages->count() === 0) {
|
if ($headerImages->count() === 0 && null !== $this->getRegion()) {
|
||||||
$headerImages = $this->getRegion()->getHeaderImages();
|
$headerImages = $this->getRegion()->getHeaderImages();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -696,7 +696,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
|
|||||||
{
|
{
|
||||||
$headerImages = $this->headerImages;
|
$headerImages = $this->headerImages;
|
||||||
|
|
||||||
if ($headerImages->count() === 0) {
|
if ($headerImages->count() === 0 && null !== $this->getCity()) {
|
||||||
$headerImages = $this->getCity()->getHeaderImages();
|
$headerImages = $this->getCity()->getHeaderImages();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -858,7 +858,7 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements
|
|||||||
{
|
{
|
||||||
$headerImages = $this->headerImages;
|
$headerImages = $this->headerImages;
|
||||||
|
|
||||||
if ($headerImages->count() === 0) {
|
if ($headerImages->count() === 0 && null !== $this->getRegion()) {
|
||||||
$headerImages = $this->getRegion()->getHeaderImages();
|
$headerImages = $this->getRegion()->getHeaderImages();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ class Region extends AbstractDestination implements TeaserInterface
|
|||||||
{
|
{
|
||||||
$headerImages = $this->headerImages;
|
$headerImages = $this->headerImages;
|
||||||
|
|
||||||
if ($headerImages->count() === 0) {
|
if ($headerImages->count() === 0 && null !== $this->getCountry()) {
|
||||||
$headerImages = $this->getCountry()->getHeaderImages();
|
$headerImages = $this->getCountry()->getHeaderImages();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user