mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
BUGFIX MSSQLDatabase::indexList() should always return an array, even if it's empty to be consistent with MSSQLDatabase::tableList()
This commit is contained in:
parent
4f1f1f9082
commit
efb03701ca
@ -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) {
|
||||||
|
|
||||||
@ -698,7 +698,7 @@ class MSSQLDatabase extends Database {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return isset($indexList) ? $indexList : null;
|
return $indexList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user