From 29512e54b71d758f26dc2d55d4faa06d2abbecb3 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Tue, 12 Jun 2012 14:41:44 +1200 Subject: [PATCH] BUGFIX Fixing check for array when building indexes --- code/PostgreSQLDatabase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/PostgreSQLDatabase.php b/code/PostgreSQLDatabase.php index e0e41b3..70b8038 100755 --- a/code/PostgreSQLDatabase.php +++ b/code/PostgreSQLDatabase.php @@ -548,7 +548,7 @@ public function alterTable($tableName, $newFields = null, $newIndexes = null, $a //Pick up the new indexes here: if($newIndexes){ foreach($newIndexes as $name=>$this_index){ - if($this_index['type']=='fulltext'){ + if(is_array($this_index) && $this_index['type']=='fulltext'){ $ts_details=$this->fulltext($this_index, $tableName, $name); if(!isset($fieldList[$ts_details['ts_name']])){ $fulltexts.="ALTER TABLE \"{$tableName}\" ADD COLUMN {$ts_details['fulltexts']};";