Fixed undefined component variable (#1808)

This commit is contained in:
gellu
2016-05-24 21:04:47 +02:00
committed by Graham Campbell
parent 96450c476c
commit 962b40f0e9

View File

@@ -63,7 +63,7 @@ class SendComponentUpdateEmailNotificationHandler
$globalSubscribers = $this->subscriber->isVerified()->isGlobal()->get();
foreach ($globalSubscribers as $subscriber) {
$this->notify($event, $subscriber);
$this->notify($component, $subscriber);
}
$notified = $globalSubscribers->pluck('id')->all();
@@ -78,19 +78,19 @@ class SendComponentUpdateEmailNotificationHandler
});
foreach ($componentSubscribers as $subscriber) {
$this->notify($event, $subscriber);
$this->notify($component, $subscriber);
}
}
/**
* Send notification to subscriber.
*
* @param \CachetHQ\Cachet\Bus\Events\ComponentWasUpdatedEvent $event
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
* @param \CachetHQ\Cachet\Models\Component $component
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
*
* @return \Illuminate\Database\Eloquent\Collection
*/
public function notify(ComponentWasUpdatedEvent $event, $subscriber)
public function notify(Component $component, Subscriber $subscriber)
{
$mail = [
'subject' => trans('cachet.subscriber.email.component.subject'),