Use fetchOne() instead of numRows() when doing a COUNT(*).

This commit is contained in:
Thomas Tanghus 2013-09-23 15:52:06 +02:00
parent be402fab53
commit 60bff6c589
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ class Tags implements \OCP\ITags {
\OCP\Util::writeLog('core', __METHOD__. ', DB error: ' . \OCP\DB::getErrorMessage($result), \OCP\Util::ERROR);
return false;
}
return ((int)$result->numRows() === 0);
return ((int)$result->fetchOne() === 0);
} catch(\Exception $e) {
\OCP\Util::writeLog('core', __METHOD__.', exception: '.$e->getMessage(),
\OCP\Util::ERROR);