fix(installer): Strip protocol from TP_HOST to keep only hostname (#1952)
Some checks are pending
Continuous Integration / Nightly builds 📦 (push) Waiting to run
Continuous Integration / 🎉 Deploy (push) Waiting to run
PHPMD / Run PHPMD scanning (push) Waiting to run

This commit is contained in:
Roman Kelesidis 2025-06-17 18:14:47 +03:00 committed by GitHub
commit 81bf67c2be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -206,6 +206,12 @@ if (is_file(BB_ROOT . '.env')) {
$newValue = trim(readline());
if (!empty($newValue) || $key === 'DB_PASSWORD') {
if ($key === 'TP_HOST') {
if (!preg_match('/^https?:\/\//', $newValue)) {
$newValue = 'https://' . $newValue;
}
$newValue = parse_url($newValue, PHP_URL_HOST);
}
$line = "$key=$newValue";
$$key = $newValue;
} else {