File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,6 @@ public function canShowSitemapLink(): bool
9696 */
9797 private function getDisplayIn (): array
9898 {
99- return explode (', ' , $ this ->config ->displayIn ());
99+ return explode (', ' , $ this ->config ->displayIn () ?: '' );
100100 }
101101}
Original file line number Diff line number Diff line change 44 * Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
55 */
66
7- use Magefan \HtmlSitemap \Block \Link ;
8- use Magento \Framework \Escaper ;
9-
10- /** @var Link $block */
11- /** @var Escaper $escaper */
7+ /** @var \Magefan\HtmlSitemap\Block\Link $block */
8+ /** @var \Magento\Framework\Escaper $escaper */
129
1310$ openLinks = $ block ->getOpenLinks () == 1 ? '' : 'target="_blank" ' ;
1411?>
12+ <?php
13+ if (!isset ($ escaper )) {
14+ /* Compatability fix for old Magento versions */
15+ $ escaper = $ block ;
16+ }
17+ ?>
1518<?php if ($ block ->canShowSitemapLink ()): ?>
1619 <li>
1720 <a href="<?= $ escaper ->escapeUrl ($ block ->getHref ()) ?> " name="header_htmlsitemap_link" <?= $ openLinks ?> >
You can’t perform that action at this time.
0 commit comments