Should this be `if ( !is_empty( $allowedLanguages['*'] ) ) ...`?
Looks like at this point `isset( $allowedLanguages['*'] )` will always be true.