// skip database connection if we don't have a db_name and db_hosts
if ($db_name && is_array($db_hosts)) {
// in case db_hosts was specified as csv
if (!is_array($db_hosts)) { // THIS SHOULD BE BEFORE if ($db_name && is_array($db_hosts))
$db_hosts = explode(',', $db_hosts);
}
// skip database connection if we don't have a db_name and db_hosts if ($db_name && is_array($db_hosts)) {