From 3e03bd512a49b6bc1df798d60ec248ce60cac72f Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Sun, 24 May 2026 19:11:14 +0100 Subject: [PATCH] Drop unreachable empty-endpoint branch from host check --- src/Appwrite/Platform/Workers/Migrations.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 542ed4d045..eda00c6de7 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -236,10 +236,7 @@ class Migrations extends Action } } - // Empty-string endpoint slips through processMigration's `??` defaulting (which only - // catches null/absent); treat it as targeting the internal migration host. - $isLocalEndpoint = (is_string($sourceHost) && !empty($allowedHosts) && (new Hostname($allowedHosts))->isValid($sourceHost)) - || (empty($credentials['endpoint']) && $migrationHost !== ''); + $isLocalEndpoint = is_string($sourceHost) && !empty($allowedHosts) && (new Hostname($allowedHosts))->isValid($sourceHost); $sourceRegion = $this->sourceProject->getAttribute('region', 'default'); $destinationRegion = $this->project->getAttribute('region', 'default');