diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index a56e0a05df..b98c5f0215 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -2901,9 +2901,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') $lengths[$i] ??= null; if ($attributeArray === true) { - if ($lengths[$i] === null) { - $lengths[$i] = Database::ARRAY_INDEX_LENGTH; - } + $lengths[$i] ??= Database::ARRAY_INDEX_LENGTH; $orders[$i] = null; } }