Skip to content

Commit

Permalink
Fix for #17, fixed undefined index error when no filters are selected…
Browse files Browse the repository at this point in the history
…, fixed type error in url rewrite generator
  • Loading branch information
Edwin Jacobs committed Nov 18, 2020
1 parent 3d5c2d5 commit 055f632
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Controller/Adminhtml/Page/Save.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ protected function hydrateLandingPage(LandingPageInterface $landingPage, array $
unset($data[LandingPageInterface::OVERVIEW_PAGE_IMAGE]);
}
$this->dataObjectHelper->populateWithArray($landingPage, $data, LandingPageInterface::class);
$landingPage->setFilterAttributes(serialize($data[LandingPageInterface::FILTER_ATTRIBUTES]));
$filterAttributes = $data[LandingPageInterface::FILTER_ATTRIBUTES] ?? [];
$landingPage->setFilterAttributes(serialize($filterAttributes));
}
}
4 changes: 2 additions & 2 deletions src/Model/UrlRewriteService.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ static function (UrlRewrite $rewrite) {
}

/**
* @param LandingPage $page
* @param UrlRewriteGeneratorInterface $page
* @param string|null $suffix
*/
public function generateRewrite(LandingPage $page, string $suffix = null)
public function generateRewrite(UrlRewriteGeneratorInterface $page, string $suffix = null)
{
$urlRewritesToPersist = [];

Expand Down

0 comments on commit 055f632

Please sign in to comment.