From 60bff6c5896c22b31ee7864fa48026a1de5ce3fb Mon Sep 17 00:00:00 2001
From: Thomas Tanghus <thomas@tanghus.net>
Date: Mon, 23 Sep 2013 15:52:06 +0200
Subject: [PATCH] Use fetchOne() instead of numRows() when doing a COUNT(*).

---
 lib/tags.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/tags.php b/lib/tags.php
index 955eb3cd36..ff9f35ebc9 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);
-- 
GitLab