From c1161ff27cf81f759221fcfa4f99891674058a38 Mon Sep 17 00:00:00 2001 From: fogelito Date: Mon, 2 Feb 2026 08:13:24 +0200 Subject: [PATCH] check isset --- src/Appwrite/Platform/Workers/Migrations.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index dd20bd9ec4..70b3ed7d97 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -345,11 +345,9 @@ class Migrations extends Action $credentials = $migration->getAttribute('credentials', []); if ($migration->getAttribute('source') === SourceAppwrite::getName()) { - if (empty($credentials)) { - $credentials['projectId'] = $project->getId(); - $credentials['apiKey'] = $tempAPIKey; - $credentials['endpoint'] = $endpoint; - } + $credentials['projectId'] = $credentials['projectId'] ?? $project->getId(); + $credentials['apiKey'] = $credentials['apiKey'] ?? $tempAPIKey; + $credentials['endpoint'] = $credentials['endpoint'] ?? $endpoint; } if ($migration->getAttribute('destination') === DestinationAppwrite::getName()) {