Skip to content

Commit

Permalink
Merge pull request #9 from bookboon/hotfix/fixes
Browse files Browse the repository at this point in the history
frontpage::getBySlug was not returning correct obj
  • Loading branch information
AthanasiosKoumpouras authored May 19, 2017
2 parents 68cf848 + 5b2ceb3 commit 062e8b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Entity/Frontpage.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public static function get(Bookboon $bookboon)
*/
public static function getBySlug(Bookboon $bookboon, $slug)
{
foreach (self::get($bookboon) as $frontpage) {
$frontpageArray = self::get($bookboon)->getEntityStore()->get();

foreach ($frontpageArray as $frontpage) {
if ($frontpage->getSlug() === $slug) {
return $frontpage;
}
Expand Down

0 comments on commit 062e8b2

Please sign in to comment.