diff --git a/src/includes/classes/paypal-utilities.inc.php b/src/includes/classes/paypal-utilities.inc.php index 0bc2444..e90845b 100644 --- a/src/includes/classes/paypal-utilities.inc.php +++ b/src/includes/classes/paypal-utilities.inc.php @@ -61,9 +61,11 @@ public static function paypal_postvars() { foreach(preg_split("/[\r\n]+/", preg_replace("/^SUCCESS/i", "", $response)) as $varline) { - list($key, $value) = preg_split("/\=/", $varline, 2); - if(strlen($key = trim($key)) && strlen($value = trim($value))) - $postvars[$key] = trim(stripslashes(urldecode($value))); + if (!empty($varline)) { + list($key, $value) = preg_split("/\=/", $varline, 2); + if (strlen($key = trim($key)) && strlen($value = trim($value))) + $postvars[$key] = trim(stripslashes(urldecode($value))); + } } $postvars = self::paypal_postvars_back_compat($postvars); // From verified data.