wpsharks / s2member

s2Member® Framework (membership management for WordPress®).
64 stars 36 forks source link

PHP 8.2 Deprecated: Automatic conversion of false to array is deprecated #1243

Open elemdeso opened 2 months ago

elemdeso commented 2 months ago

EXPLANATION OF THE ISSUE

On the default return page after purchasing access to a specific page (via PaypPal button) this error message appears:

Deprecated: Automatic conversion of false to array is deprecated in /var/www/vhosts/..../httpdocs/walk/wp-content/plugins/s2member/src/includes/classes/paypal-return-in.inc.php on line 132

The transaction with the PayPal sandbox appears to work fine though.

I believe this deprecation originated with PHP 8.1 so I tested with PHP 8.0 and the error went away.

This is on a fresh install of Wordpress 6.5.2 under PHP 8.2.17 with no other plugins installed and the current version of Twenty Twenty Four theme.

STEPS TO REPRODUCE THE ISSUE

Add shortcode for a specific page PayPal buy now button. Transact with sandbox, return to default page. Error message appears above default content.

BEHAVIOR THAT I EXPECTED

BEHAVIOR THAT I OBSERVED

Screenshot 2024-04-10 at 14 01 16