Optimize the previous commit.
This commit is contained in:
parent
f2991fb0d9
commit
37d38c2b28
|
@ -109,9 +109,7 @@ abstract class FrontendAbstract extends \AzuraCast\Radio\AdapterAbstract
|
||||||
return ((APP_IS_SECURE) ? 'https' : 'http') . '://' . $base_url . '/radio/' . $radio_port;
|
return ((APP_IS_SECURE) ? 'https' : 'http') . '://' . $base_url . '/radio/' . $radio_port;
|
||||||
} else {
|
} else {
|
||||||
// Remove port number and other decorations.
|
// Remove port number and other decorations.
|
||||||
$base_url_parts = parse_url($base_url);
|
return 'http://' . (parse_url($base_url, \PHP_URL_HOST) ?? $base_url) . ':' . $radio_port;
|
||||||
|
|
||||||
return 'http://' . ($base_url_parts['host'] ?? $base_url) . ':' . $radio_port;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue