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

View file

@ -46,6 +46,11 @@ class ClientMapper extends Mapper {
$result = $qb->execute(); $result = $qb->execute();
$row = $result->fetch(); $row = $result->fetch();
$result->closeCursor(); $result->closeCursor();
if (!is_array($row)) {
$row = [];
}
return Client::fromRow($row); return Client::fromRow($row);
} }