Skip to content

Commit 65f06d2

Browse files
authored
Allow fals-y values for unsupported options
This is to acomodate any situations where `0` is passed via configuration or even defaults from other layers (in my case, laravel).
1 parent 0cbd70a commit 65f06d2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/stomp/StompProducer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function send(Destination $destination, Message $message): void
4747

4848
public function setDeliveryDelay(int $deliveryDelay = null): Producer
4949
{
50-
if (null === $deliveryDelay) {
50+
if (empty($deliveryDelay)) {
5151
return $this;
5252
}
5353

@@ -61,7 +61,7 @@ public function getDeliveryDelay(): ?int
6161

6262
public function setPriority(int $priority = null): Producer
6363
{
64-
if (null === $priority) {
64+
if (empty($priority)) {
6565
return $this;
6666
}
6767

@@ -75,7 +75,7 @@ public function getPriority(): ?int
7575

7676
public function setTimeToLive(int $timeToLive = null): Producer
7777
{
78-
if (null === $timeToLive) {
78+
if (empty($timeToLive)) {
7979
return $this;
8080
}
8181

0 commit comments

Comments
 (0)