Drop unreachable empty-endpoint branch from host check

This commit is contained in:
Prem Palanisamy
2026-05-24 19:11:14 +01:00
parent cd2506ada9
commit 3e03bd512a
+1 -4
View File
@@ -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');