Elementor Pro - Fatal Uncaught TypeError caused by empty settings in Loop Grid widget #27212
Open
6 tasks done
Labels
status/awaiting_triage
Indicates when an Issue, Pull Request, or Discussion awaits to be triaged.
Prerequisites
Description
If in the loop-grid widget the "Items Per Page" or "Columns" settings are set to no value it will lead to a fatal
Uncaught TypeError
in/elementor-pro/modules/woocommerce/module.php
at line1601
inside theadjust_setting_for_product_renderer()
function. This is because theceil()
function will be called with a string parameter instead of numeric.Possible solutions:
isset()
to! empty()
since probably the0
numeric value wouldn't make any difference to the rows calculation.rows
calculation.if
statement at line 1600 should check for empty string before trying to calculate therows
setting.Here's the stack trace:
Steps to reproduce
Expected behavior
Expected behavior is for the code to not produce fatal errors and break people's sites.
Isolating the problem
Elementor System Info
Click to reveal
Agreement
The text was updated successfully, but these errors were encountered: