File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/Symfony/Component/Messenger Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 2222class DelayedMessageHandlingException extends RuntimeException
2323{
2424 private array $ exceptions ;
25- private Envelope $ envelope ;
25+ private ? Envelope $ envelope ;
2626
27- public function __construct (array $ exceptions , Envelope $ envelope )
27+ public function __construct (array $ exceptions , Envelope $ envelope = null )
2828 {
2929 $ this ->envelope = $ envelope ;
3030
@@ -49,7 +49,7 @@ public function getExceptions(): array
4949 return $ this ->exceptions ;
5050 }
5151
52- public function getEnvelope (): Envelope
52+ public function getEnvelope (): ? Envelope
5353 {
5454 return $ this ->envelope ;
5555 }
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ private function ack(): bool
187187 $ receiver ->reject ($ envelope );
188188 }
189189
190- if ($ e instanceof HandlerFailedException || $ e instanceof DelayedMessageHandlingException) {
190+ if ($ e instanceof HandlerFailedException || ( $ e instanceof DelayedMessageHandlingException && null !== $ e -> getEnvelope ()) ) {
191191 $ envelope = $ e ->getEnvelope ();
192192 }
193193
You can’t perform that action at this time.
0 commit comments