mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-18 07:52:21 +01:00
Return false if no rows was retrieved in getContact()
This commit is contained in:
parent
667a362fb3
commit
d20ff966fe
@ -448,6 +448,10 @@ class Database extends AbstractBackend {
|
||||
\OC_Log::write('contacts', __METHOD__. 'DB error: ' . \OC_DB::getErrorMessage($result), \OCP\Util::ERROR);
|
||||
return false;
|
||||
}
|
||||
if((int)$result->numRows() === 0) {
|
||||
\OCP\Util::writeLog('contacts', __METHOD__.', Not found, id: '. $id, \OCP\Util::DEBUG);
|
||||
return false;
|
||||
}
|
||||
} catch(\Exception $e) {
|
||||
\OCP\Util::writeLog('contacts', __METHOD__.', exception: '.$e->getMessage(), \OCP\Util::ERROR);
|
||||
\OCP\Util::writeLog('contacts', __METHOD__.', id: '. $id, \OCP\Util::DEBUG);
|
||||
|
Loading…
x
Reference in New Issue
Block a user