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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user