Use fetchOne() instead of numRows() when doing a COUNT(*).
This commit is contained in:
parent
be402fab53
commit
60bff6c589
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue