Skip to content

Commit

Permalink
🚑 fix modified is not a field
Browse files Browse the repository at this point in the history
thanks @tobimori

Signed-off-by: bnomei <[email protected]>
  • Loading branch information
bnomei committed Mar 2, 2023
1 parent 4e23440 commit e6ffb59
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion classes/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Bnomei;

use Kirby\Cms\Field;
use Kirby\Cms\Pages;
use Kirby\Exception\DuplicateException;
use Kirby\Exception\InvalidArgumentException;
Expand Down Expand Up @@ -158,7 +159,7 @@ public function optionsFromDefault(?Pages $pages = null, $options = []): array
$options['modified'] = $modified;

$datefield = $items->first()->{$options['datefield']}();
if ($datefield->isNotEmpty()) {
if ($datefield instanceof Field && $datefield->isNotEmpty()) {
$options['date'] = date($options['dateformat'], $datefield->toTimestamp());
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bnomei/kirby3-feed",
"type": "kirby-plugin",
"version": "1.5.7",
"version": "1.5.8",
"description": "Generate a RSS/JSON/Sitemap-Feed from a Pages-Collection",
"license": "MIT",
"authors": [
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php return array(
'root' => array(
'name' => 'bnomei/kirby3-feed',
'pretty_version' => '1.5.7',
'version' => '1.5.7.0',
'pretty_version' => '1.5.8',
'version' => '1.5.8.0',
'reference' => NULL,
'type' => 'kirby-plugin',
'install_path' => __DIR__ . '/../../',
Expand All @@ -11,8 +11,8 @@
),
'versions' => array(
'bnomei/kirby3-feed' => array(
'pretty_version' => '1.5.7',
'version' => '1.5.7.0',
'pretty_version' => '1.5.8',
'version' => '1.5.8.0',
'reference' => NULL,
'type' => 'kirby-plugin',
'install_path' => __DIR__ . '/../../',
Expand Down

0 comments on commit e6ffb59

Please sign in to comment.