]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix #2074 by initializing as an array
authorMichael Gapczynski <mtgap@owncloud.com>
Mon, 4 Mar 2013 17:08:41 +0000 (12:08 -0500)
committerMichael Gapczynski <mtgap@owncloud.com>
Mon, 4 Mar 2013 17:08:41 +0000 (12:08 -0500)
lib/group/backend.php
lib/group/database.php

index e7b7b21d95774721809b2899e769165d83aaae67..26a784efb28bf2551e0c64d840bd4facbf48b820 100644 (file)
@@ -142,14 +142,14 @@ abstract class OC_Group_Backend implements OC_Group_Interface {
         * @param int $offset
         * @return array with display names (value) and user ids (key)
         */
-       public function DisplayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
-               $displayNames = '';
+       public function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
+               $displayNames = array();
                $users = $this->usersInGroup($gid, $search, $limit, $offset);
-               foreach ( $users as $user ) {
-                       $DisplayNames[$user] = $user;
+               foreach ($users as $user) {
+                       $displayNames[$user] = $user;
                }
 
-               return $DisplayNames;
+               return $displayNames;
        }
 
 }
index 40e9b0d4147e48bbbadc86936cf2e5b739312ddf..d0974685ff623bad945e29003fc827c075dbb4df 100644 (file)
@@ -219,8 +219,8 @@ class OC_Group_Database extends OC_Group_Backend {
         * @param int $offset
         * @return array with display names (value) and user ids (key)
         */
-       public function DisplayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
-               $displayNames = '';
+       public function displayNamesInGroup($gid, $search = '', $limit = -1, $offset = 0) {
+               $displayNames = array();
 
                $stmt = OC_DB::prepare('SELECT `*PREFIX*users`.`uid`, `*PREFIX*users`.`displayname`'
                        .' FROM `*PREFIX*users`'