Skip to content

Commit

Permalink
[Bugfix] Fix another undefined array key errors
Browse files Browse the repository at this point in the history
  • Loading branch information
zoglo committed Nov 2, 2022
1 parent cdda792 commit 94d6d8e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Resources/contao/controllers/EstateManagerRead.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function run($module, $id)
));
}

if(\is_array($this->currParam['fields']))
if(isset($this->currParam['fields']) && \is_array($this->currParam['fields']))
{
while($objContacts->next())
{
Expand All @@ -151,7 +151,7 @@ public function run($module, $id)
case 'singleSRC':
$imageSize = array();

if(\is_array($this->currParam['imgSize']))
if(isset($this->currParam['imgSize']) && \is_array($this->currParam['imgSize']))
{
$imageSize = $this->currParam['imgSize'];
}
Expand All @@ -170,7 +170,7 @@ public function run($module, $id)
}

// set new status if there no data
if($data['results'] !== null && \count($data['results']))
if(($data['results'] ?? null) && \count($data['results']))
{
$data['status'] = self::STATUS_SUCCESS;
}
Expand Down Expand Up @@ -220,7 +220,7 @@ private function parseRealEstateCollection($objRealEstate)
$realEstate = new RealEstate($objRealEstate, null);
}

if(\is_array($this->currParam['fields']))
if(isset($this->currParam['fields']) && \is_array($this->currParam['fields']))
{
// create fields array
$collection['fields'] = array();
Expand Down Expand Up @@ -280,7 +280,7 @@ private function parseRealEstateCollection($objRealEstate)
}

// add template
if($this->currParam['template'])
if($this->currParam['template'] ?? null)
{
$objTemplate = new FrontendTemplate($this->currParam['template']);

Expand Down

0 comments on commit 94d6d8e

Please sign in to comment.