1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 00:40:06 +01:00

Fix tld php errors from #241

Fixes #618 - PHP errors running TLD command if didn't run `valet install` as part of upgrading from version 2.0.12
This commit is contained in:
Chris Brown
2018-08-24 12:20:13 -04:00
parent 23e2eee8a1
commit f4281b4eaa
2 changed files with 11 additions and 4 deletions

View File

@@ -115,12 +115,15 @@ function writeBaseConfiguration()
}
/**
* For upgrades, change config key 'domain' to 'tld'
* Migrate old configurations from 'domain' to 'tld'
*/
$config = $this->read();
if (isset($config['domain']) && !isset($config['tld'])) {
$this->updateKey('tld', $config['domain']);
if (isset($config['tld'])) {
return;
}
$this->updateKey('tld', !empty($config['domain']) ? $config['domain'] : 'test');
}
/**