summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/group/database.php2
-rw-r--r--lib/private/group/manager.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/group/database.php b/lib/private/group/database.php
index baaf2cf2739..8a6cb68753c 100644
--- a/lib/private/group/database.php
+++ b/lib/private/group/database.php
@@ -185,7 +185,7 @@ class OC_Group_Database extends OC_Group_Backend {
public function groupExists($gid) {
$query = OC_DB::prepare('SELECT `gid` FROM `*PREFIX*groups` WHERE `gid` = ?');
$result = $query->execute(array($gid))->fetchOne();
- if ($result) {
+ if ($result !== false) {
return true;
}
return false;
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php
index dae6443e9d4..bf0910463dc 100644
--- a/lib/private/group/manager.php
+++ b/lib/private/group/manager.php
@@ -125,7 +125,7 @@ class Manager extends PublicEmitter {
* @return \OC\Group\Group
*/
public function createGroup($gid) {
- if (!$gid) {
+ if ($gid === '' || is_null($gid)) {
return false;
} else if ($group = $this->get($gid)) {
return $group;