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

PHP Fatal error: Uncaught TypeError: stripslashes(): Argument #1 ($string) must be of type string, array given in /base/inc/post-selector.php:71 #1975

Closed JoelLisenby closed 3 months ago

JoelLisenby commented 3 months ago

I noticed the following error, when running PHP 8.x [8.3 in particular] on the following line: https://github.com/siteorigin/so-widgets-bundle/blob/a795ebc454593be7169a54e7e8420fb337208554/base/inc/post-selector.php#L71

PHP Fatal error: Uncaught TypeError: stripslashes(): Argument #1 ($string) must be of type string, array given in /wp-content/plugins/so-widgets-bundle/base/inc/post-selector.php:71

You can see on the following line 'date_query_relative' an array, not a string.

https://github.com/siteorigin/so-widgets-bundle/blob/a795ebc454593be7169a54e7e8420fb337208554/base/inc/fields/posts.class.php#L88

AlexGStapleton commented 3 months ago

Hi Joel,

Thank you for the report. This has been fixed by https://github.com/siteorigin/so-widgets-bundle/pull/1976

Kind regards, Alex

JoelLisenby commented 3 months ago

@AlexGStapleton thank you for the quick response. I noticed the error was still occurring and made a comment here with a small adjustment to the fix. https://github.com/siteorigin/so-widgets-bundle/pull/1976#issuecomment-2111124603