Skip to content

Commit

Permalink
[Bugfix] Fixed a PHP8 error
Browse files Browse the repository at this point in the history
  • Loading branch information
zoglo committed Nov 2, 2022
1 parent 6baf9bb commit edd4290
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions src/Resources/contao/classes/Energy.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,24 @@ public function getEnergiepassValue($realEstate): string
{
$strValue = '';

switch (strtolower($realEstate->energiepassEpart))
if (isset($realEstate->energiepassEpart))
{
case 'bedarf':
if ($realEstate->energiepassEndenergiebedarf)
{
$strValue = $realEstate->energiepassEndenergiebedarf;
}
break;
switch (strtolower($realEstate->energiepassEpart))
{
case 'bedarf':
if ($realEstate->energiepassEndenergiebedarf)
{
$strValue = $realEstate->energiepassEndenergiebedarf;
}
break;

case 'verbrauch':
if ($realEstate->energiepassEnergieverbrauchkennwert)
{
$strValue = $realEstate->energiepassEnergieverbrauchkennwert;
}
break;
case 'verbrauch':
if ($realEstate->energiepassEnergieverbrauchkennwert)
{
$strValue = $realEstate->energiepassEnergieverbrauchkennwert;
}
break;
}
}

return $strValue;
Expand Down

0 comments on commit edd4290

Please sign in to comment.