Skip to content

Commit

Permalink
fix #30094 function call on array
Browse files Browse the repository at this point in the history
Fixes #30094:
Call to a member function getId() on array in module-sales/view/adminhtml/templates/order/totals/tax.phtml:62
  • Loading branch information
Morgy93 authored Oct 16, 2020
1 parent afd7ecc commit 40df5c8
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ $randomHelper = $block->getData('randomHelper');
?>

<?php foreach ($rates as $rate): ?>
<tr id="rate-<?= /* @noEscape */ $rate->getId() ?>"
<?php
$rateId = $randomHelper->getRandomString(20);
?>
<tr id="rate-<?= /* @noEscape */ $rateId ?>"
class="summary-details<?= ($isTop ? ' summary-details-first' : '') ?>">
<?php if ($rate['percent'] !== null): ?>
<td class="admin__total-mark">
Expand All @@ -74,7 +77,7 @@ $randomHelper = $block->getData('randomHelper');
</td>
<?php endif; ?>
</tr>
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none;", 'tr#rate-' . $rate->getId()) ?>
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none;", 'tr#rate-' . $rateId) ?>
<?php
$isFirst = 0;
$isTop = 0;
Expand Down

0 comments on commit 40df5c8

Please sign in to comment.