bnomei / kirby3-feed

Generate ATOM/JSON/RSS-Feed and XML-Sitemap from Pages-Collection
https://forum.getkirby.com/t/kirby3-feed-rss-json-sitemap/23574
MIT License
65 stars 8 forks source link

Calling feed on an empty collection throws error #24

Closed texnixe closed 4 years ago

texnixe commented 4 years ago

Call to a member function date() on null

Thrown by this line, should check if item exists first:

 $options['modified'] = date('r', $items->first()->{$datefieldName}()->toTimestamp());