From 2594105a5e4bb83b186ca19b35626996abe9bfd7 Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Fri, 11 Dec 2015 10:19:11 -0500 Subject: [PATCH] Handle unknown plan types more gracefully with the bandwidth limit --- airtime_mvc/application/models/Preference.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index 8a93bc81a..7021fac20 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -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 = Billing::$PLAN_TYPE_DEFAULTS[$planType]["bandwidth_limit"]; + $val = "starter"; + if (isset(Billing::$PLAN_TYPE_DEFAULTS[$planType])) { + $val = Billing::$PLAN_TYPE_DEFAULTS[$planType]["bandwidth_limit"]; + } self::setBandwidthLimit($val); } return $val;