|
|
@@ -603,10 +603,12 @@ class Table
|
|
|
$attrs['columns']
|
|
|
));
|
|
|
|
|
|
- $this->_constraints[$name]['references'][1] = array_unique(array_merge(
|
|
|
- (array)$this->_constraints[$name]['references'][1],
|
|
|
- [$attrs['references'][1]]
|
|
|
- ));
|
|
|
+ if (isset($this->_constraints[$name]['references'])) {
|
|
|
+ $this->_constraints[$name]['references'][1] = array_unique(array_merge(
|
|
|
+ (array)$this->_constraints[$name]['references'][1],
|
|
|
+ [$attrs['references'][1]]
|
|
|
+ ));
|
|
|
+ }
|
|
|
return $this;
|
|
|
}
|
|
|
} else {
|