Skip to content

Commit

Permalink
Always cast an array
Browse files Browse the repository at this point in the history
  • Loading branch information
HavokInspiration committed Jun 17, 2015
1 parent c0a96b6 commit 8b45acb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Database/Schema/Table.php
Expand Up @@ -518,12 +518,8 @@ public function addConstraint($name, $attrs)
$attrs['columns']
);

if (is_string($this->_constraints[$name]['references'][1])) {
$this->_constraints[$name]['references'][1] = [$this->_constraints[$name]['references'][1]];
}

$this->_constraints[$name]['references'][1] = array_merge(
$this->_constraints[$name]['references'][1],
(array)$this->_constraints[$name]['references'][1],
[$attrs['references'][1]]
);
return $this;
Expand Down

0 comments on commit 8b45acb

Please sign in to comment.