Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notifications.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-08-08 13:11:33 +0300
committerJoas Schilling <coding@schilljs.com>2018-08-08 13:11:33 +0300
commit219369148e6afa2f0710d9fccda2abc9c20e9630 (patch)
treef34057886700df07f1378a09b167e458f211ce06 /lib
parentbe2bfb102805d2713b177969eb83ed8c0695cce3 (diff)
Fix "Argument 1 passed to OC\Authentication\Token\Manager::getTokenById() must be of the type integer, null given"
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/PushController.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Controller/PushController.php b/lib/Controller/PushController.php
index 4678e70..ce434ac 100644
--- a/lib/Controller/PushController.php
+++ b/lib/Controller/PushController.php
@@ -106,6 +106,9 @@ class PushController extends OCSController {
}
$tokenId = $this->session->get('token-id');
+ if (!\is_int($tokenId)) {
+ return new DataResponse(['message' => 'INVALID_SESSION_TOKEN'], Http::STATUS_BAD_REQUEST);
+ }
try {
$token = $this->tokenProvider->getTokenById($tokenId);
} catch (InvalidTokenException $e) {