Skip to content

Commit 3244377

Browse files
committed
MAGETWO-99418: Deliver critical PR for 2.3.2
1 parent 2d7d5f4 commit 3244377

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

app/code/Magento/MessageQueue/Model/PoisonPillCompare.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ public function __construct(
3535
*/
3636
public function isLatestVersion(string $poisonPillVersion): bool
3737
{
38-
return (string) $poisonPillVersion === (string) $this->poisonPillRead->getLatestVersion();
38+
return $poisonPillVersion === $this->poisonPillRead->getLatestVersion();
3939
}
4040
}

app/code/Magento/MessageQueue/Model/ResourceModel/PoisonPill.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ public function put(): string
5050
/**
5151
* @inheritdoc
5252
*/
53-
public function getLatestVersion(): ?string
53+
public function getLatestVersion(): string
5454
{
5555
return $this->getVersionFromDb();
5656
}
5757

5858
/**
5959
* Returns version form DB or null.
6060
*
61-
* @return string|null
61+
* @return string
6262
*/
63-
private function getVersionFromDb(): ?string
63+
private function getVersionFromDb(): string
6464
{
6565
$select = $this->getConnection()->select()->from(
6666
$this->getTable(self::QUEUE_POISON_PILL_TABLE),
@@ -69,6 +69,6 @@ private function getVersionFromDb(): ?string
6969

7070
$result = $this->getConnection()->fetchOne($select);
7171

72-
return $result === false ? null : $result;
72+
return (string)$result;
7373
}
7474
}

lib/internal/Magento/Framework/MessageQueue/PoisonPill/PoisonPillRead.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class PoisonPillRead implements PoisonPillReadInterface
1919
*
2020
* @return string
2121
*/
22-
public function getLatestVersion(): ?string
22+
public function getLatestVersion(): string
2323
{
24-
return null;
24+
return '';
2525
}
2626
}

lib/internal/Magento/Framework/MessageQueue/PoisonPill/PoisonPillReadInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ interface PoisonPillReadInterface
1717
*
1818
* @return string
1919
*/
20-
public function getLatestVersion(): ?string;
20+
public function getLatestVersion(): string;
2121
}

0 commit comments

Comments
 (0)