summaryrefslogtreecommitdiffstats
path: root/apps/oauth2/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-05-12 12:43:22 +0200
committerLukas Reschke <lukas@statuscode.ch>2017-05-18 20:49:06 +0200
commit1a8965b488e436099bf6e1bbd025d652e9791fe7 (patch)
treeffcaded9ebb0955d6af5316430ec4208cb3734f0 /apps/oauth2/lib
parent3775b14c4c6889a4dbffa633f2cc3eef9f3ea624 (diff)
downloadnextcloud-server-1a8965b488e436099bf6e1bbd025d652e9791fe7.tar.gz
nextcloud-server-1a8965b488e436099bf6e1bbd025d652e9791fe7.zip
handle case if no valid client identifier is given
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/oauth2/lib')
-rw-r--r--apps/oauth2/lib/Db/ClientMapper.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/oauth2/lib/Db/ClientMapper.php b/apps/oauth2/lib/Db/ClientMapper.php
index 8531f6d007c..38751a2e5cf 100644
--- a/apps/oauth2/lib/Db/ClientMapper.php
+++ b/apps/oauth2/lib/Db/ClientMapper.php
@@ -46,6 +46,11 @@ class ClientMapper extends Mapper {
$result = $qb->execute();
$row = $result->fetch();
$result->closeCursor();
+
+ if (!is_array($row)) {
+ $row = [];
+ }
+
return Client::fromRow($row);
}