Optimize the previous commit.

This commit is contained in:
Buster "Silver Eagle" Neece 2017-10-20 17:20:05 -05:00
parent f2991fb0d9
commit 37d38c2b28
1 changed files with 1 additions and 3 deletions

View File

@ -109,9 +109,7 @@ abstract class FrontendAbstract extends \AzuraCast\Radio\AdapterAbstract
return ((APP_IS_SECURE) ? 'https' : 'http') . '://' . $base_url . '/radio/' . $radio_port;
} else {
// Remove port number and other decorations.
$base_url_parts = parse_url($base_url);
return 'http://' . ($base_url_parts['host'] ?? $base_url) . ':' . $radio_port;
return 'http://' . (parse_url($base_url, \PHP_URL_HOST) ?? $base_url) . ':' . $radio_port;
}
}