$sql = 'DELETE FROM `*PREFIX*locks` WHERE `userid` = ? AND `uri` = ? AND `token` = ?';
$result = OC_DB::executeAudited( $sql, array(OC_User::getUser(), $uri, $lockInfo->token));
- return $result->numRows() === 1;
+ return $result === 1;
}
OC_Log::write('core', __METHOD__. 'DB error: ' . OC_DB::getErrorMessage($result), OC_Log::ERROR);
return false;
}
- return ($result->numRows() == 0);
+ return ($result->numRows() === 0);
} catch(Exception $e) {
OCP\Util::writeLog('core', __METHOD__.', exception: '.$e->getMessage(),
OCP\Util::ERROR);