Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-9206

Attempt to assign property "number" on string

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 3.11.12
    • Module: Questionnaire
    • None
    • 3.11.1-2021062301
    • MOODLE_311_STABLE

      This error happened when a student tried to resume a questionnaire. 

      Moodle version: 3.11.12
      PHP 8.0

      What I think happens is $a is initialized to an empty string ''. Then later it tries to assign $a->number and $a->precision to $a which is not an object but a (empty) string. I guess $a = '' should be replaced by $a = new \stdClass();

      Stack Trace:

      • line 106 of /mod/questionnaire/classes/question/numerical.php: Error thrown
      • line 862 of /mod/questionnaire/classes/question/question.php: call to mod_questionnaire\question\numerical->question_survey_display()
      • line 228 of /mod/questionnaire/classes/output/renderer.php: call to mod_questionnaire\question\question->question_output()
      • line 1337 of /mod/questionnaire/questionnaire.class.php: call to mod_questionnaire\output\renderer->question_output()
      • line 1249 of /mod/questionnaire/questionnaire.class.php: call to questionnaire->survey_render()
      • line 281 of /mod/questionnaire/questionnaire.class.php: call to questionnaire->print_survey()
      • line 82 of /mod/questionnaire/complete.php: call to questionnaire->view()

            mchurch Mike Churchward
            jfrouleau Jean-François Rouleau
            Votes:
            9 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.