Skip to content

Commit 7d41def

Browse files
authored
Merge pull request #39 from midlan/fixedModelsWithConstructor
Fixed models with constructor parameters
2 parents b892c01 + 3e7acd3 commit 7d41def

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/app/code/community/FireGento/AdminMonitoring/Model/History

src/app/code/community/FireGento/AdminMonitoring/Model/History/Data.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ public function getSerializedContent()
6161
public function getContent()
6262
{
6363
// have to re-load the model as based on database datatypes the format of values changes
64-
$className = get_class($this->_savedModel);
65-
$model = new $className;
64+
$model = clone $this->_savedModel;
65+
$model->setData(array());
6666

6767
// Add store id if given
6868
if ($storeId = $this->_savedModel->getStoreId()) {

0 commit comments

Comments
 (0)