Skip to content

Commit

Permalink
v2.0.2: Make sure parsed_url contains a host
Browse files Browse the repository at this point in the history
  • Loading branch information
jfederico committed Dec 22, 2015
1 parent f689082 commit d4731db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1139,12 +1139,12 @@ function bigbluebuttonbn_server_offers($capability_name){

function bigbluebuttonbn_server_offers_bn_capabilities(){
//Validates if the server may have extended capabilities
$parse = parse_url(bigbluebuttonbn_get_cfg_server_url());
$host = $parse['host'];
$parsed_url = parse_url(bigbluebuttonbn_get_cfg_server_url());
$host = isset($parsed_url['host']) ? $parsed_url['host'] : '';
$host_ends = explode(".", $host);
$host_ends_length = count($host_ends);

return ( $host_ends_length > 0 && $host_ends[$host_ends_length -1] == 'com' && $host_ends[$host_ends_length -2] == 'blindsidenetworks' );
return ( $host_ends_length > 0 && $host_ends[$host_ends_length -1] == 'com' && $host_ends[$host_ends_length -2] == 'blindsidenetworks' );
}

function bigbluebuttonbn_get_locales_for_ui() {
Expand Down

0 comments on commit d4731db

Please sign in to comment.