mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-17 21:49:01 +01:00
Merge pull request #707 from ldidry/fix-706
Fix #706 Correct null ComponentGroup check for Atom and RSS feeds
This commit is contained in:
commit
884c43f160
@ -34,7 +34,7 @@ class AtomController extends AbstractController
|
||||
|
||||
$feed->setDateFormat('datetime');
|
||||
|
||||
if ($group) {
|
||||
if ($group->exists) {
|
||||
$group->components->map(function ($component) use ($feed) {
|
||||
$component->incidents()->orderBy('created_at', 'desc')->get()->map(function ($incident) use ($feed) {
|
||||
$this->feedAddItem($feed, $incident);
|
||||
|
@ -34,7 +34,7 @@ class RssController extends AbstractController
|
||||
|
||||
$feed->setDateFormat('datetime');
|
||||
|
||||
if ($group) {
|
||||
if ($group->exists) {
|
||||
$group->components->map(function ($component) use ($feed) {
|
||||
$component->incidents()->orderBy('created_at', 'desc')->get()->map(function ($incident) use ($feed) {
|
||||
$this->feedAddItem($feed, $incident);
|
||||
|
Loading…
x
Reference in New Issue
Block a user