Skip to content

Commit a4d0e00

Browse files
committed
fix(trigger): ensure channel is valid before processing events in TriggerSubscriber
1 parent 7f47fa4 commit a4d0e00

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Subscriber/TriggerSubscriber.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ protected function process(RowsDTO $event): void
113113
};
114114
}
115115

116-
$chan = $this->chan;
116+
if (! ($chan = $this->chan) || count($arguments) === 0) {
117+
return;
118+
}
117119

118120
foreach ($this->triggerManager->get($key) as $callable) {
119121
[$class, $method] = $callable;
@@ -131,7 +133,7 @@ protected function process(RowsDTO $event): void
131133
continue;
132134
}
133135

134-
$chan?->push([$class, $method, $args]);
136+
$chan->push([$class, $method, $args]);
135137
}
136138
}
137139
}

0 commit comments

Comments
 (0)