navigation NOBUG clone the URL passed to override_active_url

Grrr! just spent ages debugging a really subtle bugs because moodle_urls can
change, and override_active_url was keeping a reference to the caller's URL
rathern than taking a private copy.
This commit is contained in:
Tim Hunt
2010-08-06 16:12:31 +00:00
parent 9ee45db967
commit 633c0843b3
+2 -1
View File
@@ -232,7 +232,8 @@ class navigation_node implements renderable {
* @param moodle_url $url The url to use for the fullmeurl.
*/
public static function override_active_url(moodle_url $url) {
self::$fullmeurl = $url;
// Clone the URL, in case the calling script changes their URL later.
self::$fullmeurl = new moodle_url($url);
}
/**