mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-01 13:48:37 +02:00
MINOR Fixed Database class PHP notices caused by a missing array index when running dev/build to create a new table
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72750 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
8960c03376
commit
c5d1a53281
@ -299,10 +299,13 @@ abstract class Database extends Object {
|
||||
//Fix up the index for database purposes
|
||||
$index=DB::getConn()->getDbSqlDefinition($table, $index, null, true);
|
||||
|
||||
if(is_array($this->indexList[$table][$index]))
|
||||
if(!$newTable) {
|
||||
if(is_array($this->indexList[$table][$index])) {
|
||||
$array_spec = $this->indexList[$table][$index]['spec'];
|
||||
else
|
||||
} else {
|
||||
$array_spec = $this->indexList[$table][$index];
|
||||
}
|
||||
}
|
||||
|
||||
if($newTable || !isset($this->indexList[$table][$index])) {
|
||||
$this->transCreateIndex($table, $index, $spec);
|
||||
@ -362,9 +365,13 @@ abstract class Database extends Object {
|
||||
if($spec_orig==DB::getConn()->IdColumn())
|
||||
$specValue=DB::getConn()->IdColumn(true);
|
||||
|
||||
if(is_array($this->fieldList[$table][$field]))
|
||||
if(!$newTable) {
|
||||
if(is_array($this->fieldList[$table][$field])) {
|
||||
$fieldValue = $this->fieldList[$table][$field]['data_type'];
|
||||
else $fieldValue=$this->fieldList[$table][$field];
|
||||
} else {
|
||||
$fieldValue = $this->fieldList[$table][$field];
|
||||
}
|
||||
}
|
||||
|
||||
// Get the version of the field as we would create it. This is used for comparison purposes to see if the
|
||||
// existing field is different to what we now want
|
||||
|
Loading…
Reference in New Issue
Block a user