You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix PHP warning when using Date Range filter with single date (#2420)
When entering only a start or end date in a Date Range filter, the
search widget attempted to access array element [0] on an associative
array, causing: "PHP Warning: Undefined array key 0 in
class-search-widget.php on line 829"
Changed array access from $value[0] to reset($value) to properly handle
both numeric and associative arrays.
Fixes issue where Date Range filters were ignored when only one date was
entered in DataTables layout Views.
ResolvesGravityKit/DataTables#268
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Date Range filters now correctly handle cases when only a start or
only an end date is entered.
* Resolved an issue affecting the DataTables layout.
* **Documentation**
* Updated changelog to reflect the Date Range and layout fixes.
* **Tests**
* Added unit coverage verifying Date Range filter behavior for
associative input (start/end) to prevent warnings and ensure correct
filtering.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
💾 [Build
file](https://www.dropbox.com/scl/fi/1aho7s9v5tpdfox8kri1l/gravityview-2.43.3-e2ea39417.zip?rlkey=o403p1il6uyhowvo6tdxdrsdy&dl=1)
(e2ea394).
0 commit comments