diff options
author | Detlev Zundel <dzu@member.fsf.org> | 2018-10-14 18:53:53 +0200 |
---|---|---|
committer | Bernhard Posselt <BernhardPosselt@users.noreply.github.com> | 2018-10-14 18:53:53 +0200 |
commit | 8337d2aa7d95fbc89b2b314bb9c9389675a0e047 (patch) | |
tree | cb05e746e2f4b58da2193f78b82cdc116d135370 | |
parent | 341b705ca87432333d89ab4e54096b539e41659a (diff) |
Fix lastModified to be a string rather than an integer. (#355)
This fixes https://github.com/nextcloud/news/issues/350#issue-369283392
Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
-rw-r--r-- | lib/Db/Feed.php | 10 | ||||
-rw-r--r-- | lib/Db/Folder.php | 8 | ||||
-rw-r--r-- | lib/Db/Item.php | 8 |
3 files changed, 13 insertions, 13 deletions
diff --git a/lib/Db/Feed.php b/lib/Db/Feed.php index 898a93718..e6bd73481 100644 --- a/lib/Db/Feed.php +++ b/lib/Db/Feed.php @@ -46,8 +46,8 @@ class Feed extends Entity implements IAPI, \JsonSerializable protected $articlesPerUpdate = 0; /** @var string|null */ protected $httpLastModified = null; - /** @var int|null */ - protected $lastModified = 0; + /** @var string|null */ + protected $lastModified = '0'; /** @var string|null */ protected $httpEtag = null; /** @var string|null */ @@ -158,7 +158,7 @@ class Feed extends Entity implements IAPI, \JsonSerializable } /** - * @return int|null + * @return string|null */ public function getLastModified() { @@ -433,9 +433,9 @@ class Feed extends Entity implements IAPI, \JsonSerializable } /** - * @param int|null $lastModified + * @param string|null $lastModified */ - public function setLastModified(int $lastModified = null) + public function setLastModified(string $lastModified = null) { if ($this->lastModified !== $lastModified) { $this->lastModified = $lastModified; diff --git a/lib/Db/Folder.php b/lib/Db/Folder.php index 07fa7b369..f588cdacc 100644 --- a/lib/Db/Folder.php +++ b/lib/Db/Folder.php @@ -30,8 +30,8 @@ class Folder extends Entity implements IAPI, \JsonSerializable protected $opened = true; /** @var int|null */ protected $deletedAt = 0; - /** @var int|null */ - protected $lastModified = 0; + /** @var string|null */ + protected $lastModified = '0'; /** * @return int|null @@ -47,7 +47,7 @@ class Folder extends Entity implements IAPI, \JsonSerializable } /** - * @return int|null + * @return string|null */ public function getLastModified() { @@ -110,7 +110,7 @@ class Folder extends Entity implements IAPI, \JsonSerializable } } - public function setLastModified(int $lastModified = null) + public function setLastModified(string $lastModified = null) { if ($this->lastModified !== $lastModified) { diff --git a/lib/Db/Item.php b/lib/Db/Item.php index 91c79e44b..cd7606f22 100644 --- a/lib/Db/Item.php +++ b/lib/Db/Item.php @@ -46,8 +46,8 @@ class Item extends Entity implements IAPI, \JsonSerializable protected $feedId; /** @var int */ protected $status = 0; - /** @var int|null */ - protected $lastModified = 0; + /** @var string|null */ + protected $lastModified = '0'; /** @var string|null */ protected $searchIndex; /** @var bool */ @@ -181,7 +181,7 @@ class Item extends Entity implements IAPI, \JsonSerializable } /** - * @return int|null + * @return string|null */ public function getLastModified() { @@ -356,7 +356,7 @@ class Item extends Entity implements IAPI, \JsonSerializable } } - public function setLastModified(int $lastModified = null) + public function setLastModified(string $lastModified = null) { if ($this->lastModified !== $lastModified) { $this->lastModified = $lastModified; |