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

This commit is contained in:
mlutfy 2009-02-03 20:58:04 +00:00
parent f813e844ef
commit 1825dcac69
1 changed files with 6 additions and 5 deletions

View File

@ -223,6 +223,8 @@ class m_admin {
function get_creator_list() {
global $err,$mem,$cuid;
$creators = array();
$err->log("admin","get_reseller_list");
if (!$this->enabled) {
$err->raise("admin",1);
@ -231,7 +233,7 @@ class m_admin {
if ($cuid != 2000) {
$err->raise("admin",1);
return false;
return $creators;
}
$db=new DB_System();
@ -240,12 +242,11 @@ class m_admin {
if ($db->num_rows()) {
while ($db->next_record()) {
$c[]=$this->get_creator($db->f("creator"));
$creators[] = $this->get_creator($db->f("creator"));
}
return $c;
} else {
return false;
}
return $creators;
}
/* ----------------------------------------------------------------- */