Closed
Description
Preconditions and environment
- Magento version 2.4.6-p3
- Anything else that would help a developer reproduce the bug
Steps to reproduce
Just make the welcome text field empty :
and then you can see the error in front-end
Magento v2.4.6-p3
PHP 8.1
Expected result
we expect to see nothing when the welcome text is empty
Actual result
TypeError: addslashes(): Argument #1 ($string) must be of type string, null given in /var/www/html/vendor/magento/framework/Escaper.php:440
Stack trace:
#0 /var/www/html/vendor/magento/framework/Escaper.php(440): addslashes(NULL)
#1 /var/www/html/vendor/magento/module-theme/Block/Html/Header.php(62): Magento\Framework\Escaper->escapeQuote(NULL, true)
#2 /var/www/html/src/Kreando/Theme/Magento_Theme/templates/html/header.phtml(11): Magento\Theme\Block\Html\Header->getWelcome()
#3 /var/www/html/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/var/www/html/s...')
#4 /var/www/html/generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php(46): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Theme\Block\Html\Header), '/var/www/html/s...', Array)
#5 /var/www/html/vendor/magento/framework/View/Element/Template.php(263): Magento\Framework\View\TemplateEngine\Php\Interceptor->render(Object(Magento\Theme\Block\Html\Header), '/var/www/html/s...', Array)
#6 /var/www/html/vendor/magento/framework/View/Element/Template.php(293): Magento\Framework\View\Element\Template->fetchView('/var/www/html/s...')
#7 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1117): Magento\Framework\View\Element\Template->_toHtml()
#8 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1121): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}()
#9 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(670): Magento\Framework\View\Element\AbstractBlock->_loadCache()
#10 /var/www/html/vendor/magento/framework/View/Layout.php(578): Magento\Framework\View\Element\AbstractBlock->toHtml()
#11 /var/www/html/vendor/magento/framework/View/Layout.php(555): Magento\Framework\View\Layout->_renderBlock('header')
#12 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(161): Magento\Framework\View\Layout->renderNonCachedElement('header')
#13 /var/www/html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('header')
#14 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderElement('header', false)
#15 /var/www/html/vendor/honl/magento2-templatehints/Plugin/View/LayoutPlugin.php(70): Magento\Framework\View\Layout\Interceptor->Magento\Framework\View\Layout\{closure}('header', false)
#16 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(150): Ho\Templatehints\Plugin\View\LayoutPlugin->aroundRenderElement(Object(Magento\Framework\View\Layout\Interceptor), Object(Closure), 'header')
#17 /var/www/html/vendor/magento/framework/View/Element/Html/Links.php(63): Magento\Framework\View\Layout\Interceptor->renderElement('header')
#18 /var/www/html/vendor/magento/framework/View/Element/Html/Links.php(83): Magento\Framework\View\Element\Html\Links->renderLink(Object(Magento\Theme\Block\Html\Header))
#19 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1117): Magento\Framework\View\Element\Html\Links->_toHtml()
#20 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1121): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}()
#21 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(670): Magento\Framework\View\Element\AbstractBlock->_loadCache()
#22 /var/www/html/vendor/magento/framework/View/Layout.php(578): Magento\Framework\View\Element\AbstractBlock->toHtml()
#23 /var/www/html/vendor/magento/framework/View/Layout.php(555): Magento\Framework\View\Layout->_renderBlock('header.links')
#24 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(161): Magento\Framework\View\Layout->renderNonCachedElement('header.links')
#25 /var/www/html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('header.links')
#26 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderElement('header.links', false)
#27 /var/www/html/vendor/honl/magento2-templatehints/Plugin/View/LayoutPlugin.php(70): Magento\Framework\View\Layout\Interceptor->Magento\Framework\View\Layout\{closure}('header.links', false)
#28 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(150): Ho\Templatehints\Plugin\View\LayoutPlugin->aroundRenderElement(Object(Magento\Framework\View\Layout\Interceptor), Object(Closure), 'header.links', false)
#29 /var/www/html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement('header.links', false)
#30 /var/www/html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('header.panel', false)
#31 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(161): Magento\Framework\View\Layout->renderNonCachedElement('header.panel')
#32 /var/www/html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('header.panel')
#33 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderElement('header.panel', false)
#34 /var/www/html/vendor/honl/magento2-templatehints/Plugin/View/LayoutPlugin.php(70): Magento\Framework\View\Layout\Interceptor->Magento\Framework\View\Layout\{closure}('header.panel', false)
#35 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(150): Ho\Templatehints\Plugin\View\LayoutPlugin->aroundRenderElement(Object(Magento\Framework\View\Layout\Interceptor), Object(Closure), 'header.panel', false)
#36 /var/www/html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement('header.panel', false)
#37 /var/www/html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('header.panel.wr...', false)
#38 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(161): Magento\Framework\View\Layout->renderNonCachedElement('header.panel.wr...')
#39 /var/www/html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('header.panel.wr...')
#40 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderElement('header.panel.wr...', false)
#41 /var/www/html/vendor/honl/magento2-templatehints/Plugin/View/LayoutPlugin.php(70): Magento\Framework\View\Layout\Interceptor->Magento\Framework\View\Layout\{closure}('header.panel.wr...', false)
#42 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(150): Ho\Templatehints\Plugin\View\LayoutPlugin->aroundRenderElement(Object(Magento\Framework\View\Layout\Interceptor), Object(Closure), 'header.panel.wr...', false)
#43 /var/www/html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement('header.panel.wr...', false)
#44 /var/www/html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('header.containe...', false)
#45 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(161): Magento\Framework\View\Layout->renderNonCachedElement('header.containe...')
#46 /var/www/html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('header.containe...')
#47 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderElement('header.containe...', false)
#48 /var/www/html/vendor/honl/magento2-templatehints/Plugin/View/LayoutPlugin.php(70): Magento\Framework\View\Layout\Interceptor->Magento\Framework\View\Layout\{closure}('header.containe...', false)
#49 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(150): Ho\Templatehints\Plugin\View\LayoutPlugin->aroundRenderElement(Object(Magento\Framework\View\Layout\Interceptor), Object(Closure), 'header.containe...', false)
#50 /var/www/html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement('header.containe...', false)
#51 /var/www/html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('page.wrapper', false)
#52 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(161): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#53 /var/www/html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper')
#54 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderElement('page.wrapper', false)
#55 /var/www/html/vendor/honl/magento2-templatehints/Plugin/View/LayoutPlugin.php(70): Magento\Framework\View\Layout\Interceptor->Magento\Framework\View\Layout\{closure}('page.wrapper', false)
#56 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(150): Ho\Templatehints\Plugin\View\LayoutPlugin->aroundRenderElement(Object(Magento\Framework\View\Layout\Interceptor), Object(Closure), 'page.wrapper', false)
#57 /var/www/html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper', false)
#58 /var/www/html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('root', false)
#59 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(161): Magento\Framework\View\Layout->renderNonCachedElement('root')
#60 /var/www/html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root')
#61 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderElement('root', false)
#62 /var/www/html/vendor/honl/magento2-templatehints/Plugin/View/LayoutPlugin.php(70): Magento\Framework\View\Layout\Interceptor->Magento\Framework\View\Layout\{closure}('root', false)
#63 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(150): Ho\Templatehints\Plugin\View\LayoutPlugin->aroundRenderElement(Object(Magento\Framework\View\Layout\Interceptor), Object(Closure), 'root')
#64 /var/www/html/vendor/magento/framework/View/Layout.php(975): Magento\Framework\View\Layout\Interceptor->renderElement('root')
#65 /var/www/html/generated/code/Magento/Framework/View/Layout/Interceptor.php(195): Magento\Framework\View\Layout->getOutput()
#66 /var/www/html/vendor/magento/framework/View/Result/Page.php(260): Magento\Framework\View\Layout\Interceptor->getOutput()
#67 /var/www/html/vendor/magento/framework/View/Result/Layout.php(171): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#68 /var/www/html/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(95): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#69 /var/www/html/vendor/magento/framework/App/Http.php(120): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#70 /var/www/html/generated/code/Magento/Framework/App/Http/Interceptor.php(45): Magento\Framework\App\Http->launch()
#71 /var/www/html/vendor/justbetter/magento2-sentry/Plugin/GlobalExceptionCatcher.php(57): Magento\Framework\App\Http\Interceptor->Magento\Framework\App\Http\{closure}()
#72 /var/www/html/generated/code/Magento/Framework/App/Http/Interceptor.php(46): JustBetter\Sentry\Plugin\GlobalExceptionCatcher->aroundLaunch(Object(Magento\Framework\App\Http\Interceptor), Object(Closure))
#73 /var/www/html/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#74 /var/www/html/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#75 {main}
Additional information
No response
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.