Skip to content

Commit 6a198f7

Browse files
committed
Fix PHP8 warning in templates
1 parent 2eaa91d commit 6a198f7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Resources/contao/templates/mm_attr_file.html5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php if (is_array($this->src)): ?>
1+
<?php if (\is_array($this->src)): ?>
22
<ul class="file<?= $this->additional_class ?>">
33
<?php foreach ($this->src as $arrFile):
44
$title =
@@ -12,7 +12,7 @@
1212

1313
<?php if ($this->settings->get('file_showLink')): ?>
1414
<?php if ($this->settings->get('file_showImage')): ?>
15-
<a class="cboxElement" data-lightbox="<?= $arrFile['lb'] ?>" title="<?= $title ?>"
15+
<a class="cboxElement" data-lightbox="<?= $arrFile['lb'] ?? '' ?>" title="<?= $title ?>"
1616
href="<?= $arrFile['imageUrl'] ?>">
1717
<?php else: ?>
1818
<a title="<?= $title ?>" href="<?= $arrFile['url'] ?>">

src/Resources/contao/templates/mm_attr_file_alternative.html5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<?php if ($this->settings->get('file_showLink')): ?>
99
<?php if ($this->settings->get('file_showImage')): ?>
10-
<a class="cboxElement" data-lightbox="<?= $arrFile['lb'] ?>" title="<?= $arrFile['alt'] ?>"
10+
<a class="cboxElement" data-lightbox="<?= $arrFile['lb'] ?? '' ?>" title="<?= $arrFile['alt'] ?>"
1111
href="<?= $arrFile['imageUrl'] ?>">
1212
<?php else: ?>
1313
<a title="<?= $arrFile['alt'] ?>" href="<?= $arrFile['url'] ?>">

0 commit comments

Comments
 (0)