Skip to content

Commit

Permalink
Merge pull request #39 from midlan/fixedModelsWithConstructor
Browse files Browse the repository at this point in the history
Fixed models with constructor parameters
  • Loading branch information
Schrank authored Jun 15, 2020
2 parents b892c01 + 3e7acd3 commit 7d41def
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public function getSerializedContent()
public function getContent()
{
// have to re-load the model as based on database datatypes the format of values changes
$className = get_class($this->_savedModel);
$model = new $className;
$model = clone $this->_savedModel;
$model->setData(array());

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

0 comments on commit 7d41def

Please sign in to comment.