Skip to content

Commit

Permalink
Merge pull request #18 from loadsys/b/deal-with-unattached-models
Browse files Browse the repository at this point in the history
Deals with Unattached Models
  • Loading branch information
justinyost committed Nov 10, 2014
2 parents c453c9f + bfdccc9 commit 6e2eaa0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Controller/SitemapsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function display() {
// We need to load the class
$newModel = new $model;

if(array_key_exists('Sitemap.Sitemap', $newModel->actsAs)) {
if (!empty($newModel->actsAs) && array_key_exists('Sitemap.Sitemap', $newModel->actsAs)) {
$response = $newModel->generateSitemapData();
$sitemapData[$newModel->name] = $response;
} else {
Expand Down

0 comments on commit 6e2eaa0

Please sign in to comment.