fix numRows usage in core lib

This commit is contained in:
Jörn Friedrich Dreyer 2013-06-20 14:47:42 +02:00
parent 88fc410c19
commit c223bee6df
2 changed files with 2 additions and 2 deletions

View File

@ -178,7 +178,7 @@ class OC_Connector_Sabre_Locks extends Sabre_DAV_Locks_Backend_Abstract {
$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;
}

View File

@ -125,7 +125,7 @@ class OC_VCategories {
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);