siteorigin / so-widgets-bundle

The SiteOrigin Widgets Bundle gives you all the elements you need to build modern, responsive, and engaging website pages. Using the Widgets Bundle, you can quickly and effortlessly add buttons, sliders, heroes, maps, images, carousels, features, icons, and so much more.
https://siteorigin.com/widgets-bundle/
94 stars 66 forks source link

Post Selector: Prevent Potental Fatal #1976

Closed AlexGStapleton closed 3 months ago

AlexGStapleton commented 3 months ago

Resolves https://github.com/siteorigin/so-widgets-bundle/issues/1975

date_query_relative can be a (json encoded) string, or an array. This PR allows for both.

JoelLisenby commented 3 months ago

Hi @AlexGStapleton, just wanted to mention on line 75 here now I think you may have meant to go with this

if ( ! is_array( $query['date_query_relative'] ) ) {

instead of this

if ( ! is_array( stripslashes( $query['date_query_relative'] ) ) ) {

It was still throwing the fatal error.

AlexGStapleton commented 3 months ago

Good call. Thanks mate.