]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use fetchOne() instead of numRows() when doing a COUNT(*).
authorThomas Tanghus <thomas@tanghus.net>
Mon, 23 Sep 2013 13:52:06 +0000 (15:52 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Mon, 23 Sep 2013 13:52:06 +0000 (15:52 +0200)
lib/tags.php

index 955eb3cd363202c9ca1febe22cb5693837034394..ff9f35ebc9ed2a7d0bd4c6b8231de34ce23fdd0d 100644 (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);