Menu

#1 Validations in GetDatabaseInfo

open
nobody
None
5
2013-02-03
2007-09-19
No

Maybe some detailed error will be desired when no database info found for the desired database in the xml file.

Instead

if ($this->m_DatabaseInfo[$DBName])
return $this->m_DatabaseInfo[$DBName];

if (!$DBName)
return $DatabaseInfo;

Maybe

if ($this->m_DatabaseInfo[$DBName]) {
return $this->m_DatabaseInfo[$DBName];
} else if (!$DBName) {
//This variable never exists!!
return $DatabaseInfo;
} else {
throw new Exception ("No database information found in the config file for database {$DBName}");
}

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.