mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 16:10:08 +01:00
Fix issue where linked sites break parked sites
This commit is contained in:
13
server.php
13
server.php
@@ -63,13 +63,16 @@ function valet_support_xip_io($domain)
|
||||
* Determine the fully qualified path to the site.
|
||||
*/
|
||||
$valetSitePath = null;
|
||||
$domain = array_slice(explode('.', $siteName), -1)[0];
|
||||
|
||||
foreach ($valetConfig['paths'] as $path) {
|
||||
$domain = ($pos = strrpos($siteName, '.')) !== false
|
||||
? substr($siteName, $pos+1)
|
||||
: null;
|
||||
if (is_dir($path.'/'.$siteName) || is_dir($path.'/'.$domain)) {
|
||||
$valetSitePath = $path.'/'.($domain ?: $siteName);
|
||||
if (is_dir($path.'/'.$siteName)) {
|
||||
$valetSitePath = $path.'/'.$siteName;
|
||||
break;
|
||||
}
|
||||
|
||||
if (is_dir($path.'/'.$domain)) {
|
||||
$valetSitePath = $path.'/'.$domain;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user