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 93258e1170
commit 910a0338bb
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);