wpsharks / s2member

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

Undefined index: x_subscription_id #1231

Open bcolflesh opened 1 year ago

bcolflesh commented 1 year ago

EXPLANATION OF THE ISSUE

Version 221103 + s2Member Pro v220421

Trying to clear up PHP Warning, Notices, etc for server/package upgrades and I’ve got this one with s2Member - I see someone asked about this in 2019 in the Community Forum, but it apparently hasn’t been patched.

2023/01/14 23:12:35 [error] 1166#1166: *133947 FastCGI sent in stderr: “PHP message: PHP Notice: Undefined index: x_subscription_id in /my/path/public_html/wp-content/plugins/s2member-pro/src/includes/classes/gateways/authnet/authnet-notify-in.inc.php on line 70PHP message: PHP Notice: Undefined index: x_subscription_id in /my/path/public_html/wp-content/plugins/s2member-pro/src/includes/classes/gateways/authnet/authnet-notify-in.inc.php on line 122” while reading response header from upstream, client: 100.100.100.99, server: 99.99.99.100, request: “POST /?s2member_pro_authnet_notify=1 HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php/php7.4-fpm.sock:”, host: “myhost.com

STEPS TO REPRODUCE THE ISSUE

BEHAVIOR THAT I EXPECTED

Declare x_subscription_id so it doesn't cause an Undefined index warning (and eventually error in newer versions of PHP)

BEHAVIOR THAT I OBSERVED