Skip to content

Commit 2695b9e

Browse files
committed
Fix if case
1 parent 23995c6 commit 2695b9e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/Database/Adapter/MariaDB.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -786,10 +786,8 @@ public function createIndex(string $collection, string $id, string $type, array
786786

787787
$attributes[$i] = "`{$attr}`{$length} {$order}";
788788

789-
if($this->getSupportForCastIndexArray()){
790-
if (!empty($attribute['array'])) {
791-
$attributes[$i] = '(CAST(`' . $attr . '` AS char(' . Database::ARRAY_INDEX_LENGTH . ') ARRAY))';
792-
}
789+
if ($this->getSupportForCastIndexArray() && !empty($attribute['array'])) {
790+
$attributes[$i] = '(CAST(`' . $attr . '` AS char(' . Database::ARRAY_INDEX_LENGTH . ') ARRAY))';
793791
}
794792
}
795793

0 commit comments

Comments
 (0)