BUGFIX MSSQLDatabase::indexList() should always return an array, even if it's empty to be consistent with MSSQLDatabase::tableList()

This commit is contained in:
Sean Harvey 2009-06-15 06:41:36 +00:00
parent 4f1f1f9082
commit efb03701ca

View File

@ -666,7 +666,7 @@ class MSSQLDatabase extends Database {
public function indexList($table) { public function indexList($table) {
$indexes=DB::query("EXEC sp_helpindex '$table';"); $indexes=DB::query("EXEC sp_helpindex '$table';");
$prefix = ''; $prefix = '';
$indexList = array();
foreach($indexes as $index) { foreach($indexes as $index) {
@ -696,9 +696,9 @@ class MSSQLDatabase extends Database {
$indexList['SearchFields']['indexname']='SearchFields'; $indexList['SearchFields']['indexname']='SearchFields';
$indexList['SearchFields']['spec']='fulltext (' . $columns . ')'; $indexList['SearchFields']['spec']='fulltext (' . $columns . ')';
} }
} }
return isset($indexList) ? $indexList : null; return $indexList;
} }