-
Bug
-
Resolution: Fixed
-
Major
-
2.2
-
MOODLE_22_STABLE
-
MOODLE_22_STABLE
-
w48_
MDL-30457_m22_deluserspictures -
Easy
-
While testing MDL-30192 another regression of MDL-29602 was found.
Once again code assumes get_context_instance() will always return one context for any user and that's not try for 2.2 anymore.
To reproduce:
1) in any course, delete one user having some forum posts.
2) visit the forum/discussion with contents from the deleted user.
3) you will get this, as many times as the user picture is rendered.
Notice: Trying to get property of non-object in /lib/outputcomponents.php on line 305
|
Call Stack
|
# Time Memory Function Location
|
1 0.0001 637480 {main}( ) ../view.php:0
|
2 0.4719 16241480 forum_print_latest_discussions( ) ../view.php:239
|
3 0.4826 16304992 forum_print_discussion_header( ) ../lib.php:5352
|
4 0.4828 16306192 core_renderer->user_picture( ) ../lib.php:3650
|
5 0.4828 16308040 renderer_base->render( ) ../outputrenderers.php:1780
|
6 0.4828 16308128 core_renderer->render_user_picture( ) ../outputrenderers.php:70
|
7 0.4830 16308312 user_picture->get_url( ) ../outputrenderers.php:1817
|