strangerstudios / sitewide-sales

Run Black Friday, Cyber Monday, or other flash sales on your WordPress-powered eCommerce or membership site with WooCommerce, Easy Digital Downloads, and Paid Memberships Pro.
https://sitewidesales.com
GNU General Public License v3.0
3 stars 6 forks source link

PHP Notice for Paid Memberships Pro "Hide Banner by Membership Level" #111

Closed andrewlimaza closed 2 years ago

andrewlimaza commented 2 years ago

Describe the bug There are a couple of PHP warning notices that are shown, see steps below to reproduce below. This only happens for new sales and not editing existing/previously saved sales.

Errors:

PHP Warning: json_decode() expects parameter 1 to be string, array given in wp-content/plugins/sitewide-sales/modules/class-swsales-module-pmpro.php on line 215 [13-Jul-2022 13:17:12 UTC] PHP Warning: in_array() expects parameter 2 to be array, null given in wp-content/plugins/sitewide-sales/modules/class-swsales-module-pmpro.php on line 217

To Reproduce Steps to reproduce the behavior:

  1. Install Paid Memberships Pro.
  2. Create a new sale, do not edit an existing sale.
  3. See the error log warning.
kimcoleman commented 2 years ago

Could you run this on v1.3? I'm not getting the warning in v1.3 - I think this PR fixed it. Thanks!

andrewlimaza commented 2 years ago

No issue on V1.3, I didn't realize there was a future version branch! Sorry about that.