← All changes
|
src/includes/classes/paypal-return-in-web-accept-sp.inc.php
+3
-0
260805
→
261001
View file →
| @@ -58,8 +58,11 @@ | ||
| 58 | 58 | $paypal['s2member_log'][] = 's2Member `txn_type` identified as ( `web_accept` ) for Specific Post/Page Access.'; |
| 59 | 59 | |
| 60 | 60 | list (, $paypal['sp_ids'], $paypal['hours']) = preg_split('/\:/', $paypal['item_number'], 3); |
| 61 | 61 | |
| 62 | + //260814 Set optional gateway elements used below so sparse/null payload fields do not trigger PHP diagnostics. | |
| 63 | + $paypal = c_ws_plugin__s2member_utils_arrays::set_unset_elements($paypal, array('option_name2', 'option_selection2', 'invoice', 'first_name', 'last_name')); | |
| 64 | + | |
| 62 | 65 | $paypal['ip'] = (preg_match('/ip address/i', $paypal['option_name2']) && $paypal['option_selection2']) ? $paypal['option_selection2'] : ''; |
| 63 | 66 | $paypal['ip'] = (!$paypal['ip'] && preg_match('/^[a-z0-9]+~[0-9\.]+$/i', $paypal['invoice'])) ? preg_replace('/^[a-z0-9]+~/i', '', $paypal['invoice']) : $paypal['ip']; |
| 64 | 67 | $paypal['ip'] = (!$paypal['ip'] && c_ws_plugin__s2member_utils_ip::current()) ? c_ws_plugin__s2member_utils_ip::current() : $paypal['ip']; |
| 65 | 68 | |