From 8b45acb4c717a39615e5a94e5c78fafa785655c5 Mon Sep 17 00:00:00 2001 From: Yves P Date: Tue, 16 Jun 2015 21:07:10 +0200 Subject: [PATCH] Always cast an array --- src/Database/Schema/Table.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Database/Schema/Table.php b/src/Database/Schema/Table.php index 570ef4d61b4..05c153ee1ba 100644 --- a/src/Database/Schema/Table.php +++ b/src/Database/Schema/Table.php @@ -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;