From: Thomas Tanghus Date: Mon, 23 Sep 2013 13:52:06 +0000 (+0200) Subject: Use fetchOne() instead of numRows() when doing a COUNT(*). X-Git-Tag: v6.0.0alpha2~121^2~7^2~1^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=910a0338bb296e2e51d6c9d37d0483f8d05b1c5c;p=nextcloud-server.git Use fetchOne() instead of numRows() when doing a COUNT(*). --- diff --git a/lib/tags.php b/lib/tags.php index 955eb3cd363..ff9f35ebc9e 100644 --- a/lib/tags.php +++ b/lib/tags.php @@ -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);