Skip to content

Commit 40df5c8

Browse files
authored
fix #30094 function call on array
Fixes #30094: Call to a member function getId() on array in module-sales/view/adminhtml/templates/order/totals/tax.phtml:62
1 parent afd7ecc commit 40df5c8

File tree

1 file changed

+5
-2
lines changed
  • app/code/Magento/Sales/view/adminhtml/templates/order/totals

1 file changed

+5
-2
lines changed

app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ $randomHelper = $block->getData('randomHelper');
5959
?>
6060

6161
<?php foreach ($rates as $rate): ?>
62-
<tr id="rate-<?= /* @noEscape */ $rate->getId() ?>"
62+
<?php
63+
$rateId = $randomHelper->getRandomString(20);
64+
?>
65+
<tr id="rate-<?= /* @noEscape */ $rateId ?>"
6366
class="summary-details<?= ($isTop ? ' summary-details-first' : '') ?>">
6467
<?php if ($rate['percent'] !== null): ?>
6568
<td class="admin__total-mark">
@@ -74,7 +77,7 @@ $randomHelper = $block->getData('randomHelper');
7477
</td>
7578
<?php endif; ?>
7679
</tr>
77-
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none;", 'tr#rate-' . $rate->getId()) ?>
80+
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none;", 'tr#rate-' . $rateId) ?>
7881
<?php
7982
$isFirst = 0;
8083
$isTop = 0;

0 commit comments

Comments
 (0)