From fef949f6eabc52acb8d63bfbd221cf906dec4eb7 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 17 Sep 2012 12:50:04 -0400 Subject: [PATCH] band aided some bug --- airtime_mvc/application/models/Preference.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index 807d23b6d..33059cebd 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -1100,7 +1100,17 @@ class Application_Model_Preference return function ($x) { return $x; }; } else { $ds = unserialize($v); - return function ($x) use ($ds) { return $ds['ColReorder'][$x]; } ; + return function ($x) use ($ds) { + if ( in_array($ds['ColReorder'], $x) ) { + return $ds['ColReorder'][$x]; + } else { + Logging::warn("Index $x does not exist preferences"); + Logging::warn("Defaulting to identity and printing + preferences"); + Logging::warn($ds); + return $x; + } + } ; } }