Skip to content

Commit e6ffb59

Browse files
committed
🚑 fix modified is not a field
thanks @tobimori Signed-off-by: bnomei <[email protected]>
1 parent 4e23440 commit e6ffb59

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

classes/Feed.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Bnomei;
66

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

160161
$datefield = $items->first()->{$options['datefield']}();
161-
if ($datefield->isNotEmpty()) {
162+
if ($datefield instanceof Field && $datefield->isNotEmpty()) {
162163
$options['date'] = date($options['dateformat'], $datefield->toTimestamp());
163164
}
164165
} else {

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bnomei/kirby3-feed",
33
"type": "kirby-plugin",
4-
"version": "1.5.7",
4+
"version": "1.5.8",
55
"description": "Generate a RSS/JSON/Sitemap-Feed from a Pages-Collection",
66
"license": "MIT",
77
"authors": [

vendor/composer/installed.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php return array(
22
'root' => array(
33
'name' => 'bnomei/kirby3-feed',
4-
'pretty_version' => '1.5.7',
5-
'version' => '1.5.7.0',
4+
'pretty_version' => '1.5.8',
5+
'version' => '1.5.8.0',
66
'reference' => NULL,
77
'type' => 'kirby-plugin',
88
'install_path' => __DIR__ . '/../../',
@@ -11,8 +11,8 @@
1111
),
1212
'versions' => array(
1313
'bnomei/kirby3-feed' => array(
14-
'pretty_version' => '1.5.7',
15-
'version' => '1.5.7.0',
14+
'pretty_version' => '1.5.8',
15+
'version' => '1.5.8.0',
1616
'reference' => NULL,
1717
'type' => 'kirby-plugin',
1818
'install_path' => __DIR__ . '/../../',

0 commit comments

Comments
 (0)