Undefined index error fixed by returning a default error if none is set in the database.

This commit is contained in:
Rudi Grinberg 2012-09-11 13:56:48 -04:00
parent e1f4010346
commit 63b1ead363
2 changed files with 10 additions and 4 deletions

View file

@ -1130,6 +1130,13 @@ class Application_Model_Preference
public static function getCurrentLibraryTableSetting()
{
return unserialize(self::getValue("library_datatable"));
$v = self::getValue("library_datatable");
if( $v === '' ) {
return function ($x) { return $x; };
} else {
$ds = unserialize($v);
return function ($x) use ($ds) { return $ds['ColReorder'][$x]; } ;
}
//return unserialize(self::getValue("library_datatable"));
}
}