Skip to content

Commit

Permalink
Fix PHP 8 warnings and regional locales in nav_dropdown (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzmg authored Jan 6, 2023
1 parent 99b6e9e commit 6a5ebd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contao/templates/nav_dropdown.html5
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
<?php if ($intLevel == 1 && !$blnHasActive): ?><option value="">-</option><?php endif; ?>
<?php foreach ($this->items as $item): ?>
<?php if ($item['isActive']): ?>
<option class="active <?php echo $item['class']; ?>" selected><?php echo str_repeat('&nbsp;&nbsp;&nbsp;', $intLevel-1); ?><?php echo $arrLanguages[strtolower($item['link'])] ?: $item['link']; ?><?php echo $item['subitems']; ?></option>
<option class="active <?php echo $item['class']; ?>" selected><?php echo str_repeat('&nbsp;&nbsp;&nbsp;', $intLevel-1); ?><?php echo $arrLanguages[$item['item']->getLocaleId()] ?? $item['link']; ?><?php echo $item['subitems']; ?></option>
<?php else: ?>
<option <?php if ($item['class']): ?> class="<?php echo $item['class']; ?>"<?php endif; ?> value="<?php echo $item['href']; ?>"><?php echo str_repeat('&nbsp;&nbsp;&nbsp;', $intLevel-1); ?><?php echo $arrLanguages[strtolower($item['link'])] ?: $item['link']; ?><?php echo $item['subitems']; ?></option>
<option <?php if ($item['class']): ?> class="<?php echo $item['class']; ?>"<?php endif; ?> value="<?php echo $item['href']; ?>"><?php echo str_repeat('&nbsp;&nbsp;&nbsp;', $intLevel-1); ?><?php echo $arrLanguages[$item['item']->getLocaleId()] ?? $item['link']; ?><?php echo $item['subitems']; ?></option>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($intLevel == 1): ?>
Expand Down

0 comments on commit 6a5ebd6

Please sign in to comment.