From 2157b9f221c5db64f47db462e130f4a580c72ff7 Mon Sep 17 00:00:00 2001 From: Japhet Stevens Date: Sat, 20 Apr 2013 01:36:00 -0400 Subject: [PATCH] bugfix: NULL quoteId considered paid --- app/code/community/Bitpay/Bitcoins/Model/Ipn.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/community/Bitpay/Bitcoins/Model/Ipn.php b/app/code/community/Bitpay/Bitcoins/Model/Ipn.php index 8aa9eb8..e847c14 100644 --- a/app/code/community/Bitpay/Bitcoins/Model/Ipn.php +++ b/app/code/community/Bitpay/Bitcoins/Model/Ipn.php @@ -27,6 +27,9 @@ class Bitpay_Bitcoins_Model_Ipn extends Mage_Core_Model_Abstract function GetStatusReceived($quoteId, $statuses) { + if (!$quoteId) + return false; + $collection = $this->getCollection()->AddFilter('quote_id', $quoteId); foreach($collection as $i) if (in_array($i->getStatus(), $statuses))