diff --git a/app/code/core/Mage/Sales/Model/Order/Status/History.php b/app/code/core/Mage/Sales/Model/Order/Status/History.php index b257de30d86..8171e0aea6f 100644 --- a/app/code/core/Mage/Sales/Model/Order/Status/History.php +++ b/app/code/core/Mage/Sales/Model/Order/Status/History.php @@ -38,7 +38,6 @@ * @method $this setParentId(int $value) * @method string getStatus() * @method $this setStatus(string $value) - * @method $this setStoreId(int $value) * @method int getIsVisibleOnFront() * @method $this setIsVisibleOnFront(int $value) */ @@ -69,7 +68,7 @@ protected function _construct() } /** - * Set order object and grab some metadata from it + * Set order object * * @param Mage_Sales_Model_Order $order * @return $this @@ -77,10 +76,19 @@ protected function _construct() public function setOrder(Mage_Sales_Model_Order $order) { $this->_order = $order; - $this->setStoreId($order->getStoreId()); return $this; } + /** + * Get store id + * + * @throws Mage_Core_Model_Store_Exception + */ + public function getStoreId(): int + { + return $this->getStore()->getStoreId(); + } + /** * Notification flag * diff --git a/lib/Varien/Data/Collection/Db.php b/lib/Varien/Data/Collection/Db.php index 147f25ca3d0..ff85dcaadab 100644 --- a/lib/Varien/Data/Collection/Db.php +++ b/lib/Varien/Data/Collection/Db.php @@ -587,6 +587,7 @@ public function load($printQuery = false, $logQuery = false) $item->setIdFieldName($this->getIdFieldName()); } $item->addData($row); + $item->setDataChanges(false); $this->addItem($item); } }