-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Preconditions (*)
- Magento 2.3.5
Steps to reproduce (*)
- Add products to Compare where at least one product has no value set for at least one of its comparable attributes (e.g. "Description" or "Short Description" is empty).
- Go to the compare page (<site_root>/catalog/product_compare/index)
Expected result (*)
- Compare page should load normally, where any unconfigured attributes show "N/A" or "No".
Actual result (*)
- Compare page is Broken and a Fatal Error is displayed.
Fatal error: Uncaught TypeError: preg_match() expects parameter 2 to be string, object given in /app/web/vendor/magento/module-catalog/Helper/Output.php:245
Fatal error: Uncaught TypeError: preg_match() expects parameter 2 to be string, object given in /app/web/vendor/magento/module-catalog/Helper/Output.php:245 Stack trace: #0 /app/web/vendor/magento/module-catalog/Helper/Output.php(245): preg_match('/{{([a-z]{0,10}...', Object(Magento\Framework\Phrase)) #1 /app/web/vendor/magento/module-catalog/Helper/Output.php(185): Magento\Catalog\Helper\Output->isDirectivesExists(Object(Magento\Framework\Phrase)) #2 /app/web/vendor/magento/module-catalog/view/frontend/templates/product/compare/list.phtml(134): Magento\Catalog\Helper\Output->productAttribute(Object(Magento\Catalog\Model\Product\Interceptor), Object(Magento\Framework\Phrase), 'short_descripti...') #3 /app/web/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/app/web/vendor...') #4 /app/web/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Catalog\Block\Product\Compare\ListCompare\Interceptor), '/app/web/vendor...', Array) #5 /app/w in /app/web/vendor/magento/module-catalog/Helper/Output.php on line 245
