Skip to content

how to fix issues in Escaper.php?

I upgraded Magento2.3.4 to 2.4.3-p3.
But I got issues in checkout page and cart page.

1 exception(s):
Exception #0 (Exception): Notice: Array to string conversion in /home/caterin1/test.cateringspares.com.au/vendor/magento/framework/Escaper.php on line 261

Exception #0 (Exception): Notice: Array to string conversion in /home/caterin1/test.cateringspares.com.au/vendor/magento/framework/Escaper.php on line 261
<pre>#1 MagentoFrameworkEscaper->escapeHtmlAttr() called at [vendor/magento/framework/View/Element/AbstractBlock.php:931]
#2 MagentoFrameworkViewElementAbstractBlock->escapeHtmlAttr() called at [app/design/frontend/Caterings/spares/Magento_Catalog/templates/product/image_with_borders.phtml:20]
#3 include() called at [vendor/magento/framework/View/TemplateEngine/Php.php:71]
#4 MagentoFrameworkViewTemplateEnginePhp->render() called at [vendor/magento/framework/View/Element/Template.php:273]
#5 MagentoFrameworkViewElementTemplate->fetchView() called at [vendor/magento/framework/View/Element/Template.php:303]
#6 MagentoFrameworkViewElementTemplate->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1114]
#7 MagentoFrameworkViewElementAbstractBlock->MagentoFrameworkViewElement{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1118]
#8 MagentoFrameworkViewElementAbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:678]
#9 MagentoFrameworkViewElementAbstractBlock->toHtml() called at [app/design/frontend/Caterings/spares/Magento_Checkout/templates/cart/item/default.phtml:30]
#10 include() called at [vendor/magento/framework/View/TemplateEngine/Php.php:71]
#11 MagentoFrameworkViewTemplateEnginePhp->render() called at [vendor/magento/framework/View/Element/Template.php:273]
#12 MagentoFrameworkViewElementTemplate->fetchView() called at [vendor/magento/framework/View/Element/Template.php:303]
#13 MagentoFrameworkViewElementTemplate->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1114]
#14 MagentoFrameworkViewElementAbstractBlock->MagentoFrameworkViewElement{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1118]
#15 MagentoFrameworkViewElementAbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:678]
#16 MagentoFrameworkViewElementAbstractBlock->toHtml() called at [vendor/magento/module-checkout/Block/Cart/AbstractCart.php:134]
#17 MagentoCheckoutBlockCartAbstractCart->getItemHtml() called at [app/design/frontend/Caterings/spares/Magento_Checkout/templates/cart/form.phtml:43]
#18 include() called at [vendor/magento/framework/View/TemplateEngine/Php.php:71]
#19 MagentoFrameworkViewTemplateEnginePhp->render() called at [vendor/magento/framework/View/Element/Template.php:273]
#20 MagentoFrameworkViewElementTemplate->fetchView() called at [vendor/magento/framework/View/Element/Template.php:303]
#21 MagentoFrameworkViewElementTemplate->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1114]
#22 MagentoFrameworkViewElementAbstractBlock->MagentoFrameworkViewElement{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1118]
#23 MagentoFrameworkViewElementAbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:678]
#24 MagentoFrameworkViewElementAbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:578]
#25 MagentoFrameworkViewLayout->_renderBlock() called at [vendor/magento/framework/View/Layout.php:555]
#26 MagentoFrameworkViewLayout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#27 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#28 MagentoFrameworkViewLayout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#29 MagentoFrameworkViewLayoutInterceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#30 MagentoFrameworkViewLayout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#31 MagentoFrameworkViewLayout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#32 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#33 MagentoFrameworkViewLayout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#34 MagentoFrameworkViewLayoutInterceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#35 MagentoFrameworkViewLayout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#36 MagentoFrameworkViewLayout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#37 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#38 MagentoFrameworkViewLayout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#39 MagentoFrameworkViewLayoutInterceptor->renderElement() called at [vendor/magento/framework/View/Element/AbstractBlock.php:525]
#40 MagentoFrameworkViewElementAbstractBlock->getChildHtml() called at [vendor/magento/module-checkout/view/frontend/templates/cart.phtml:16]
#41 include() called at [vendor/magento/framework/View/TemplateEngine/Php.php:71]
#42 MagentoFrameworkViewTemplateEnginePhp->render() called at [vendor/magento/framework/View/Element/Template.php:273]
#43 MagentoFrameworkViewElementTemplate->fetchView() called at [vendor/magento/framework/View/Element/Template.php:303]
#44 MagentoFrameworkViewElementTemplate->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1114]
#45 MagentoFrameworkViewElementAbstractBlock->MagentoFrameworkViewElement{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1118]
#46 MagentoFrameworkViewElementAbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:678]
#47 MagentoFrameworkViewElementAbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:578]
#48 MagentoFrameworkViewLayout->_renderBlock() called at [vendor/magento/framework/View/Layout.php:555]
#49 MagentoFrameworkViewLayout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#50 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#51 MagentoFrameworkViewLayout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#52 MagentoFrameworkViewLayoutInterceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#53 MagentoFrameworkViewLayout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#54 MagentoFrameworkViewLayout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#55 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#56 MagentoFrameworkViewLayout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#57 MagentoFrameworkViewLayoutInterceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#58 MagentoFrameworkViewLayout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#59 MagentoFrameworkViewLayout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#60 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#61 MagentoFrameworkViewLayout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#62 MagentoFrameworkViewLayoutInterceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#63 MagentoFrameworkViewLayout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#64 MagentoFrameworkViewLayout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#65 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#66 MagentoFrameworkViewLayout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#67 MagentoFrameworkViewLayoutInterceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#68 MagentoFrameworkViewLayout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#69 MagentoFrameworkViewLayout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#70 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#71 MagentoFrameworkViewLayout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#72 MagentoFrameworkViewLayoutInterceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#73 MagentoFrameworkViewLayout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#74 MagentoFrameworkViewLayout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#75 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#76 MagentoFrameworkViewLayout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#77 MagentoFrameworkViewLayoutInterceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#78 MagentoFrameworkViewLayout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#79 MagentoFrameworkViewLayout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#80 MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#81 MagentoFrameworkViewLayout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#82 MagentoFrameworkViewLayoutInterceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:975]
#83 MagentoFrameworkViewLayout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#84 MagentoFrameworkViewLayoutInterceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#85 MagentoFrameworkViewLayoutInterceptor->MagentoFrameworkInterception{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#86 MagentoFrameworkViewLayoutInterceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:347]
#87 MagentoFrameworkViewLayoutInterceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:260]
#88 MagentoFrameworkViewResultPage->render() called at [vendor/magento/framework/View/Result/Layout.php:171]
#89 MagentoFrameworkViewResultLayout->renderResult() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#90 MagentoFrameworkViewResultPageInterceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#91 MagentoFrameworkViewResultPageInterceptor->MagentoFrameworkInterception{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#92 MagentoFrameworkViewResultPageInterceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:95]
#93 MagentoFrameworkViewResultPageInterceptor->renderResult() called at [vendor/magento/framework/App/Http.php:120]
#94 MagentoFrameworkAppHttp->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:23]
#95 MagentoFrameworkAppHttpInterceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:264]
#96 MagentoFrameworkAppBootstrap->run() called at [pub/index.php:29]
</pre>

How to fix issues?