-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.1.17, 4.5.3
-
MOODLE_401_STABLE, MOODLE_405_STABLE
When get_query_string() is used on a moodle url that contains params with nested array keys the following occurs:
Exception - rawurlencode(): Argument #1 ($string) must be of type string, array given |
It can be replicated with a single line:
(new \moodle_url('/?param[0][0]=0'))->get_query_string(); |
In practice the use case for this is pretty small and I haven't hit it in core. We hit this when using it to analyse the current url in a plugin, and this formatting can be seen in a few places like webservice urls - /webservice/rest/server.php?wstoken=x&wsfunction=core_user_get_users&criteria[0][key]=username&criteria[0][value]=name
We have since changed our approach, but thought this was still worth reporting.