Merge pull request #3300 from crazyserver/MOBILE-4061

Mobile 4061
main
Noel De Martin 2022-05-30 14:10:28 +02:00 committed by GitHub
commit b67d27fc0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -512,9 +512,9 @@ class behat_app_helper extends behat_base {
// Generate custom URL.
$parsed_url = parse_url($CFG->behat_wwwroot);
$domain = $parsed_url['host'];
$rootpath = $parsed_url['path'];
$url = $this->get_mobile_url_scheme() . "://$username@$domain/$rootpath?token=$token&privatetoken=$privatetoken";
$domain = $parsed_url['host'] ?? '';
$rootpath = $parsed_url['path'] ?? '';
$url = $this->get_mobile_url_scheme() . "://$username@$domain$rootpath?token=$token&privatetoken=$privatetoken";
if (!empty($path)) {
$url .= '&redirect='.urlencode($CFG->behat_wwwroot.$path);