handle case if no valid client identifier is given

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
Bjoern Schiessle 2017-05-12 12:43:22 +02:00 committed by Lukas Reschke
parent 3775b14c4c
commit 1a8965b488
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
1 changed files with 5 additions and 0 deletions

View File

@ -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);
}