From 848d5137062ba0223f389f4bf963ab8e0c5b9473 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Tue, 6 May 2014 00:22:02 +0200 Subject: [PATCH] Only run EndSubscribe when it is really a sub --- classes/Subscription.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/Subscription.php b/classes/Subscription.php index 12f4e86f10..56df0b88be 100644 --- a/classes/Subscription.php +++ b/classes/Subscription.php @@ -124,7 +124,9 @@ class Subscription extends Managed_DataObject } } - Event::handle('EndSubscribe', array($subscriber, $other)); + if ($sub instanceof Subscription) { // i.e. not SubscriptionQueue + Event::handle('EndSubscribe', array($subscriber, $other)); + } } return $sub; -- 2.39.5