[Messenger] fix empty amqp body returned as false
This commit is contained in:
parent
828e5a4ae3
commit
ee5cbe3658
@ -60,9 +60,11 @@ class AmqpReceiver implements ReceiverInterface, MessageCountAwareInterface
|
||||
return;
|
||||
}
|
||||
|
||||
$body = $amqpEnvelope->getBody();
|
||||
|
||||
try {
|
||||
$envelope = $this->serializer->decode([
|
||||
'body' => $amqpEnvelope->getBody(),
|
||||
'body' => false === $body ? '' : $body, // workaround https://github.com/pdezwart/php-amqp/issues/351
|
||||
'headers' => $amqpEnvelope->getHeaders(),
|
||||
]);
|
||||
} catch (MessageDecodingFailedException $exception) {
|
||||
|
Reference in New Issue
Block a user