Handle unknown plan types more gracefully with the bandwidth limit

This commit is contained in:
Albert Santoni 2015-12-11 10:19:11 -05:00
parent e3b0a93ebb
commit 2594105a5e
1 changed files with 4 additions and 1 deletions

View File

@ -1598,7 +1598,10 @@ class Application_Model_Preference
// Set and return the plan defaults
// TODO: remove this once all existing customers have this pref set
$planType = self::GetPlanLevel();
$val = "starter";
if (isset(Billing::$PLAN_TYPE_DEFAULTS[$planType])) {
$val = Billing::$PLAN_TYPE_DEFAULTS[$planType]["bandwidth_limit"];
}
self::setBandwidthLimit($val);
}
return $val;