diff --git a/lib/weblib.php b/lib/weblib.php
index <HASH>..<HASH> 100644
--- a/lib/weblib.php
+++ b/lib/weblib.php
@@ -503,14 +503,6 @@ class moodle_url {
      */
     public function compare(moodle_url $url, $matchtype = URL_MATCH_EXACT) {
 
-        // Set path to / if it is not set
-        if ($this->path == '') {
-            $this->path = '/';
-        }
-        if ($url->path == '') {
-            $url->path = '/';
-        }
-
         $baseself = $this->out(true);
         $baseother = $url->out(true);
navigation MDL-<I> Fixed regression created earlier