Skip to content

Commit 2e634e4

Browse files
committed
Missing fallback on AREA_FRONTEND when area is not set
1 parent bd80b1a commit 2e634e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/Sales/Model/Order/Config.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ private function getStatusLabelForArea(string $code, string $area): string
144144
*/
145145
public function getStatusLabel($code)
146146
{
147-
return $this->getStatusLabelForArea($code, $this->state->getAreaCode());
147+
$area = $this->state->getAreaCode() ?: \Magento\Framework\App\Area::AREA_FRONTEND;
148+
return $this->getStatusLabelForArea($code, $area);
148149
}
149150

150151
/**

0 commit comments

Comments
 (0)