From 82cb491a3cc5ccdd7177cb498cc1f7362a7914ab Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 20 Aug 2025 02:56:44 +1200 Subject: [PATCH] Fix attribute update refactor collision --- .../Http/Databases/Collections/Attributes/Action.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php index 9edf57b489..de45522a43 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Attributes/Action.php @@ -614,14 +614,14 @@ abstract class Action extends UtopiaAction */ foreach ($collection->getAttribute('indexes') as $index) { /** - * @var string[] $attribute + * @var array $attributes */ - $attribute = $index->getAttribute('attributes', []); - $found = \array_search($key, $attribute); + $attributes = $index->getAttribute('attributes', []); + $found = \array_search($key, $attributes); if ($found !== false) { - $attribute[$found] = $newKey; - $index->setAttribute('attributes', $attribute); + $attributes[$found] = $newKey; + $index->setAttribute('attributes', $attributes); $dbForProject->updateDocument('indexes', $index->getId(), $index); } }