Only run EndSubscribe when it is really a sub

This commit is contained in:
Mikael Nordfeldth 2014-05-06 00:22:02 +02:00
parent 10cbf8c45e
commit 848d513706

View File

@ -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;