-
Improvement
-
Resolution: Fixed
-
Minor
-
4.0.6, 4.1.1
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MOODLE_500_STABLE
-
MDL-77293-main -
-
-
There is a weird anomaly in moodle_url.
If you create an like this:
new \moodle_url('http://example.com/?tags[]=123&tags[]=456'); |
new \moodle_url('http://example.com/?tags[0]=123&tags[1]=456'); |
then that works, with $this->params['tags'] being set to ['123', '456']. And, there is code in get_query_string() which ensures this is handled right when the URL is output (and MDL-77148 is adding export_params_for_template).
However, if you try to do
new \moodle_url('http://example.com/', ['tags' => ['123', '456']]); |
then you get a coding_exception telling you not to.
Since this acutally works, I think we should stop rejecting it in params() method (while adding PHPunit coverage to verify that everything works).
- Discovered while testing
-
MDL-77148 Question bank: Filtering question by tags and then deleting, throws errors
-
- Closed
-