diff --git a/app/code/Magento/Sales/Model/Order/Config.php b/app/code/Magento/Sales/Model/Order/Config.php index 3f251c79eebfa..e9fe1ba05ac22 100644 --- a/app/code/Magento/Sales/Model/Order/Config.php +++ b/app/code/Magento/Sales/Model/Order/Config.php @@ -247,7 +247,10 @@ public function getInvisibleOnFrontStatuses() */ protected function _getStatuses($visibility) { - if ($this->statuses == null) { + if ($this->statuses === null) { + + $this->statuses = [ true => [], false => [] ]; + foreach ($this->_getCollection() as $item) { $visible = (bool) $item->getData('visible_on_front'); $this->statuses[$visible][] = $item->getData('status');