Skip to content

Commit b2bc1c4

Browse files
committed
MC-14945: Order details view is not displayed when order created with Signifyd
1 parent 01fbfeb commit b2bc1c4

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

app/code/Magento/Sales/Model/Order/Status/History.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function getOrder()
142142
*/
143143
public function getStatusLabel()
144144
{
145-
if ($this->getOrder()) {
145+
if ($this->getOrder() && $this->getStatus() !== null) {
146146
return $this->getOrder()->getConfig()->getStatusLabel($this->getStatus());
147147
}
148148
return null;

app/code/Magento/Sales/Test/Unit/Model/Order/Status/HistoryTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,17 @@ public function testGetStatusLabel()
8383
$this->assertEquals($status, $this->model->getStatusLabel());
8484
}
8585

86+
/**
87+
* @return void
88+
*/
89+
public function testGetStatusLabelWithNullStatus()
90+
{
91+
$this->model->setOrder($this->order);
92+
$this->model->setStatus(null);
93+
94+
$this->assertNull($this->model->getStatusLabel());
95+
}
96+
8697
public function testGetStoreFromStoreManager()
8798
{
8899
$resultStore = 1;

0 commit comments

Comments
 (0)