Undefined index error fixed by returning a default error if none is set in the database.
This commit is contained in:
parent
e1f4010346
commit
63b1ead363
2 changed files with 10 additions and 4 deletions
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue