Commit 9c313e7b authored by alexpott's avatar alexpott

Issue #2531042 by sdstyles, Berdir: Undefined string index 0 in...

Issue #2531042 by sdstyles, Berdir: Undefined string index 0 in WebTestBase::getAbsoluteUrl() in PHP 7
parent ac175869
......@@ -452,7 +452,7 @@ protected function getAbsoluteUrl($path) {
$path = substr($path, $length);
}
// Ensure that we have an absolute path.
if ($path[0] !== '/') {
if (empty($path) || $path[0] !== '/') {
$path = '/' . $path;
}
// Finally, prepend the $base_url.
......
......@@ -2473,7 +2473,7 @@ protected function getAbsoluteUrl($path) {
$path = substr($path, $length);
}
// Ensure that we have an absolute path.
if ($path[0] !== '/') {
if (empty($path) || $path[0] !== '/') {
$path = '/' . $path;
}
// Finally, prepend the $base_url.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment