-
Bug
-
Resolution: Fixed
-
Minor
-
3.9.6, 3.10.3, 3.11, 4.0
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
-
MOODLE_310_STABLE, MOODLE_39_STABLE
-
Steps to reproduce:
1. Accidentally write the code
$repositories = repository::get_instances(['currentcontext' => $context->id]);
|
Actual result: it seems to work, until some time later things mysteriously don't work and you have to spend a lot of time debugging it.
Expected result (once you realise it is buggy): A debugging notice like "'currentcontext' passed to repository::get_instances was not a context object. Using system context instead, but you should probably fix your code."