From: Mikael Nordfeldth Date: Mon, 5 May 2014 22:22:02 +0000 (+0200) Subject: Only run EndSubscribe when it is really a sub X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=848d5137062ba0223f389f4bf963ab8e0c5b9473;p=quix0rs-gnu-social.git Only run EndSubscribe when it is really a sub --- 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;