Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.5
-
MOODLE_35_STABLE
-
MOODLE_33_STABLE, MOODLE_34_STABLE
-
MDL-62228_master -
Description
In almost all implementations of delete_data_for_all_users_in_context, the first thing that comes is:
if (empty($context)) {
|
return;
|
}
|
However, if $context was empty the type declaration would fail. Therefore, there is no need for the above check.
It seems that everyone is copying the same mistake, so it is better to clean up the code as soon as possible before almost all 3rd party devs do the same.
Attachments
Issue Links
- is blocked by
-
MDL-62430 Some plugins do not check that context in delete_data_for_all_users_in_context() is correct context for them
-
- Closed
-