Skip to content

Commit

Permalink
Merge pull request contao-community-alliance#18 from aschempp/bugfix/…
Browse files Browse the repository at this point in the history
…php8

Fixed several PHP8 warnings
  • Loading branch information
aschempp authored Mar 1, 2023
2 parents 4c2fef5 + fba7ec4 commit d8961af
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Contao/Widgets/MultiColumnWizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ function ($value) {
}

// Build array of items
if (isset($arrField['eval']['columnPos']) && $arrField['eval']['columnPos'] != '') {
if (!empty($arrField['eval']['columnPos'])) {
$arrItems[$i][$objWidget->columnPos]['entry'] =
($arrItems[$i][$objWidget->columnPos]['entry'] ?? '') . $strWidget;
$arrItems[$i][$objWidget->columnPos]['valign'] = ($arrField['eval']['valign'] ?? '');
Expand All @@ -952,7 +952,7 @@ function ($value) {
(
'entry' => $strWidget,
'valign' => $arrField['eval']['valign'] ?? null,
'tl_class' => $arrField['eval']['tl_class'],
'tl_class' => $arrField['eval']['tl_class'] ?? null,
'hide' => $blnHiddenBody
);
}
Expand Down Expand Up @@ -1030,7 +1030,7 @@ protected function initializeWidget(&$arrField, $intRow, $strKey, $varValue)
}

// Toggle line wrap (textarea)
if (($arrField['inputType'] ?? null) == 'textarea' && $arrField['eval']['rte'] == '') {
if (($arrField['inputType'] ?? null) == 'textarea' && empty($arrField['eval']['rte'])) {
$xlabel .= ' '
. Image::getHtml(
'wrap.gif',
Expand Down Expand Up @@ -1148,9 +1148,9 @@ protected function initializeWidget(&$arrField, $intRow, $strKey, $varValue)
}
}

$strClass = $GLOBALS[($this->contaoApi->isBackend() ? 'BE_FFL' : 'TL_FFL')][$arrField['inputType']];
$strClass = $GLOBALS[($this->contaoApi->isBackend() ? 'BE_FFL' : 'TL_FFL')][$arrField['inputType'] ?? null] ?? null;

if ($strClass == '' || !class_exists($strClass)) {
if (empty($strClass) || !class_exists($strClass)) {
return null;
}

Expand Down

0 comments on commit d8961af

Please sign in to comment.