Changeset 2457


Ignore:
Timestamp:
02/03/09 21:58:04 (4 years ago)
Author:
mlutfy
Message:

get_creator_list: if there are no reseller accounts, return an empty array, avoids php warning and need for useless checks afterwards

File:
1 edited

Legend:

Unmodified
Added
Removed
  • alternc/trunk/bureau/class/m_admin.php

    r2456 r2457  
    224224    global $err,$mem,$cuid; 
    225225 
     226    $creators = array(); 
     227 
    226228    $err->log("admin","get_reseller_list"); 
    227229    if (!$this->enabled) { 
     
    232234    if ($cuid != 2000) { 
    233235      $err->raise("admin",1); 
    234       return false; 
     236      return $creators; 
    235237    } 
    236238 
     
    241243    if ($db->num_rows()) { 
    242244      while ($db->next_record()) { 
    243         $c[]=$this->get_creator($db->f("creator")); 
     245        $creators[] = $this->get_creator($db->f("creator")); 
    244246      } 
    245       return $c; 
    246     } else { 
    247       return false; 
    248     } 
     247    } 
     248 
     249    return $creators; 
    249250  } 
    250251 
Note: See TracChangeset for help on using the changeset viewer.