Changeset 5118
- Timestamp:
- 10/21/08 20:52:26 (9 months ago)
- Location:
- branches
- Files:
-
- 2 modified
-
1.0/lib/Doctrine/Import/Schema.php (modified) (2 diffs)
-
1.1/lib/Doctrine/Import/Schema.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.0/lib/Doctrine/Import/Schema.php
r5053 r5118 472 472 // Array of the array keys to move to the parent, and the value to default the child definition to 473 473 // after moving it. Will also populate the subclasses array for the inheritance parent 474 $moves = array('columns' => array()); 474 $moves = array('columns' => array(), 475 'indexes' => array(), 476 'attributes' => array(), 477 'options' => array(), 478 'checks' => array()); 475 479 476 480 foreach ($array as $className => $definition) { … … 479 483 $parent = $this->_findBaseSuperClass($array, $definition['className']); 480 484 foreach ($moves as $move => $resetValue) { 481 $array[$parent][$move] = Doctrine_Lib::arrayDeepMerge($array[$parent][$move], $definition[$move]); 482 $array[$definition['className']][$move] = $resetValue; 485 if (isset($array[$parent][$move]) && isset($definition[$move])) { 486 $array[$parent][$move] = Doctrine_Lib::arrayDeepMerge($array[$parent][$move], $definition[$move]); 487 $array[$definition['className']][$move] = $resetValue; 488 } 483 489 } 484 490 -
branches/1.1/lib/Doctrine/Import/Schema.php
r5053 r5118 472 472 // Array of the array keys to move to the parent, and the value to default the child definition to 473 473 // after moving it. Will also populate the subclasses array for the inheritance parent 474 $moves = array('columns' => array()); 474 $moves = array('columns' => array(), 475 'indexes' => array(), 476 'attributes' => array(), 477 'options' => array(), 478 'checks' => array()); 475 479 476 480 foreach ($array as $className => $definition) { … … 479 483 $parent = $this->_findBaseSuperClass($array, $definition['className']); 480 484 foreach ($moves as $move => $resetValue) { 481 $array[$parent][$move] = Doctrine_Lib::arrayDeepMerge($array[$parent][$move], $definition[$move]); 482 $array[$definition['className']][$move] = $resetValue; 485 if (isset($array[$parent][$move]) && isset($definition[$move])) { 486 $array[$parent][$move] = Doctrine_Lib::arrayDeepMerge($array[$parent][$move], $definition[$move]); 487 $array[$definition['className']][$move] = $resetValue; 488 } 483 489 } 484 490