diff --git a/lib/backend/database.php b/lib/backend/database.php index 4b705da1..955b5893 100644 --- a/lib/backend/database.php +++ b/lib/backend/database.php @@ -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);