Coding error detected and should be fixed by a programmer: PHP catchable fatal error

Coding error detected and should be fixed by a programmer: PHP catchable fatal error

by Lorenzzo Mollinar -
Number of replies: 3

When a student clicks on My Courses appears this error screen below, which can be? Can you help?


Erro de codificação detectado e deve ser corrigido por um programador: PHP catchable fatal error

Debug info: Argument 1 passed to forum_is_user_group_discussion() must be an instance of cm_info, null given, called in [dirroot]/mod/forum/lib.php on line 1379 and defined
Error code: codingerror
Stack trace:
  • line 393 of /lib/setuplib.php: coding_exception thrown
  • line 1404 of /mod/forum/lib.php: call to default_error_handler()
  • line 1379 of /mod/forum/lib.php: call to forum_is_user_group_discussion()
  • line 1474 of /mod/forum/lib.php: call to forum_filter_user_groups_discussions()
  • line 43 of /blocks/course_overview/locallib.php: call to forum_print_overview()
  • line 75 of /blocks/course_overview/block_course_overview.php: call to block_course_overview_get_overviews()
  • line 294 of /blocks/moodleblock.class.php: call to block_course_overview->get_content()
  • line 236 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
  • line 1002 of /lib/blocklib.php: call to block_base->get_content_for_output()
  • line 1054 of /lib/blocklib.php: call to block_manager->create_block_contents()
  • line 361 of /lib/outputrenderers.php: call to block_manager->ensure_content_created()
  • line 27 of /theme/aardvark/layout/head.php: call to core_renderer->standard_head_html()
  • line 25 of /theme/aardvark/layout/columns3.php: call to require()
  • line 877 of /lib/outputrenderers.php: call to include()
  • line 807 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
  • line 167 of /my/index.php: call to core_renderer->header()


We use Moodle 2.7.7+

Average of ratings: -
In reply to Lorenzzo Mollinar

Re: Coding error detected and should be fixed by a programmer: PHP catchable fatal error

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

You could post a link this post to the forums forum: https://moodle.org/mod/forum/view.php?id=732 asking for help or PM one of the superb moderators to move it.  Then it should have a better chance of somebody who knows the area answering.

In reply to Gareth J Barnard

Re: Coding error detected and should be fixed by a programmer: PHP catchable fatal error

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I'll just move it on your say so Gareth, since the code doesn't mean much to me but I assume you are saying it is related to forums?

In reply to Mary Cooch

Re: Coding error detected and should be fixed by a programmer: PHP catchable fatal error

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Mary,

Yes please, because of the lines:

line 1379 of /mod/forum/lib.php: call to forum_is_user_group_discussion()

line 1474 of /mod/forum/lib.php: call to forum_filter_user_groups_discussions()

line 43 of /blocks/course_overview/locallib.php: call to forum_print_overview()

in the stack trace, so I'm 90% sure.

Cheers,

Gareth