BUGFIX Check if the index_alt variable is set on the indexList() return before checking if it's an array

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73517 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-03-23 01:00:33 +00:00
parent b12a00c391
commit b004149267

View File

@ -306,10 +306,12 @@ abstract class Database extends Object {
$index_alt=DB::getConn()->modifyIndex($index, $spec);
if(!$newTable) {
if(is_array($this->indexList[$table][$index_alt])) {
$array_spec = $this->indexList[$table][$index_alt]['spec'];
} else {
$array_spec = $this->indexList[$table][$index_alt];
if(isset($this->indexList[$table][$index_alt])) {
if(is_array($this->indexList[$table][$index_alt])) {
$array_spec = $this->indexList[$table][$index_alt]['spec'];
} else {
$array_spec = $this->indexList[$table][$index_alt];
}
}
}