Can anyone have faced the below error while opening the product listing page at the storefront?

After upgrade magento version 2.4.3 to 2.4.5 I am facing.

1 exception(s): Exception #0 (Exception): Notice: Object of class Magento\Framework\Phrase could not be converted to int in /home/public_html/website/vendor/magento/module-catalog/view/frontend/templates/product/list/toolbar/limiter.phtml on line 26

1 Answer 1


You have to override vendor/magento/module-catalog/view/frontend/templates/product/list/toolbar/limiter.phtml in your custom theme.

Then create a file inside your theme app/design/frontend/VendorName/ThemeName/Magento_Catalog/templates/product/list/toolbar/limiter.phtml

Add below code to the file

 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 * Product list toolbar
 * @var \Magento\Catalog\Block\Product\ProductList\Toolbar $block
 * @var \Magento\Framework\Locale\LocaleFormatter $localeFormatter
<div class="field limiter">
    <label class="label" for="limiter">
        <span><?= $block->escapeHtml(__('Show')) ?></span>
    <div class="control">
        <select id="limiter" data-role="limiter" class="limiter-options">
            <?php foreach ($block->getAvailableLimit() as $_key => $_limit):?>
                <option value="<?= $block->escapeHtmlAttr($_key) ?>"
                    <?php if ($block->isLimitCurrent($_key)):?>
                    <?php endif ?>>
                    <?= $block->escapeHtml(
                        is_numeric($_limit) ? $localeFormatter->formatNumber((int) $_limit) : $_limit
                    ) ?>
            <?php endforeach; ?>
    <span class="limiter-text"><?= $block->escapeHtml(__('per page')) ?></span>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.