Skip to content

Commit

Permalink
RPC Reply Queue: Allow empty name string (in addition to null) to set…
Browse files Browse the repository at this point in the history
… up a generated queue
  • Loading branch information
AllenJB committed Oct 23, 2019
1 parent fe2b5ff commit d3c3209
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Pdo/ReplyQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(?string $name, \PDO $pdo, \DateTimeZone $dbTz)
$this->pdo = $pdo;
$this->dbTz = $dbTz;

if ($name === null) {
if (($name ?? "") === "") {
$name = "_rpc_replies";
$this->setCorrelationId(Uuid::uuid4()->getHex());
$this->declareQueue();
Expand Down
2 changes: 1 addition & 1 deletion src/Rabbit/ReplyQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(?string $name, Channel $bunnyChannel)
{
$this->channel = $bunnyChannel;
$this->name = $name;
if ($this->name === null) {
if (($this->name ?? "") === "") {
$this->setCorrelationId(Uuid::uuid4()->getHex());

$this->declareQueue();
Expand Down

0 comments on commit d3c3209

Please sign in to comment.