b778784346
Aumusingly, one of the bugs was detected by a unit test that was in Moodle 1.9, but which for some reason was not in HEAD. I have tidied up the clean_param unit tests and added a few more.