Commit d97317f3 authored by Son Nguyen's avatar Son Nguyen Committed by Gerrit Code Review

Merge "sanitize_url() should return false, when given a null URL (Bug 1497411)"

parents 4f4aa415 2389c72b
......@@ -4324,8 +4324,8 @@ function language_select_form() {
function sanitize_url($url) {
$parsedurl = parse_url($url);
if (!isset($parsedurl['scheme'])) {
if (isset($parsedurl['path'])) {
if (empty($parsedurl['scheme'])) {
if (!empty($parsedurl['path'])) {
$url = get_config('wwwroot') . ltrim($url, '/');
$parsedurl = parse_url($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