diff options
author | anoy <anoymouserver+github@mailbox.org> | 2021-01-15 21:47:18 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-01-17 17:56:37 +0100 |
commit | c67feb8d8d388e3b16603b2253ad7f86d8d72fd9 (patch) | |
tree | 4c2e0a0a352f186d95b9d86171b24595da159cbe /lib | |
parent | 4caa9d996df832fc43bd3fa71ba5d858a31cf2b5 (diff) |
fix TypeError caused by type conversion in controller
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/ItemApiController.php | 4 | ||||
-rw-r--r-- | lib/Service/ItemService.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Controller/ItemApiController.php b/lib/Controller/ItemApiController.php index c958324af..af36b87f0 100644 --- a/lib/Controller/ItemApiController.php +++ b/lib/Controller/ItemApiController.php @@ -93,14 +93,14 @@ class ItemApiController extends ApiController { // needs to be turned into a millisecond timestamp to work properly if (strlen((string) $lastModified) <= 10) { - $paddedLastModified = $lastModified . '000000'; + $paddedLastModified = $lastModified * 1000000; } else { $paddedLastModified = $lastModified; } $items = $this->oldItemService->findAllNew( $id, $type, - $paddedLastModified, + (int) $paddedLastModified, true, $this->getUserId() ); diff --git a/lib/Service/ItemService.php b/lib/Service/ItemService.php index 62a319346..8ba0a4b73 100644 --- a/lib/Service/ItemService.php +++ b/lib/Service/ItemService.php @@ -73,7 +73,7 @@ class ItemService extends Service * * @return array of items */ - public function findAllNew(?int $id, $type, $updatedSince, $showAll, $userId) + public function findAllNew(?int $id, $type, int $updatedSince, bool $showAll, string $userId) { switch ($type) { case FeedType::FEED: |