summaryrefslogtreecommitdiffstats
path: root/lib/group
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-09-17 02:36:04 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-09-17 02:49:40 +0200
commit8c7aa060884fb3eaa1fe39412eb7622b743478b4 (patch)
tree51a55400017292353dbf85ef4ef1bb7c45c2ba4f /lib/group
parentd0d3fecc9502733fadfa358bcb5e0e2baf46f224 (diff)
downloadnextcloud-server-8c7aa060884fb3eaa1fe39412eb7622b743478b4.tar.gz
nextcloud-server-8c7aa060884fb3eaa1fe39412eb7622b743478b4.zip
dont use numRows when it's not needed since it can be expensive
Diffstat (limited to 'lib/group')
-rw-r--r--lib/group/database.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/group/database.php b/lib/group/database.php
index 8a9fc53d39f..7bf9c8bb5ce 100644
--- a/lib/group/database.php
+++ b/lib/group/database.php
@@ -56,7 +56,7 @@ class OC_Group_Database extends OC_Group_Backend {
$query = OC_DB::prepare( "SELECT gid FROM `*PREFIX*groups` WHERE gid = ?" );
$result = $query->execute( array( $gid ));
- if( $result->numRows() > 0 ){
+ if( !$result->fetchRow() ){
// Can not add an existing group
return false;
}