diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index a41482b02..3edd66cdc 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -3050,7 +3050,7 @@ function convertGitUrl(string $gitRepository, string $deploymentType, GithubApp| case \App\Models\GithubApp::class: case \App\Models\GitlabApp::class: $providerInfo['host'] = Url::fromString($source->html_url)->getHost(); - $providerInfo['port'] = $source->custom_port ?? 22; + $providerInfo['port'] = ($source->custom_port !== null && $source->custom_port !== '' && (int) $source->custom_port !== 22) ? (int) $source->custom_port : 22; $providerInfo['user'] = $source->custom_user; break; }