Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-74536

Avoid PHP Notice in analytics

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Deferred
    • Icon: Minor Minor
    • None
    • 3.9.13, 3.10.10, 3.11.6, 4.0
    • Analytics
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE

      Hello,

      "PHP Notice" appear when running the cron for analytics.

      Example : "PHP Notice: Trying to get property 'timeend' of non-object in .../course/classes/analytics/target/course_enrolments.php on line 178".

      The problem is that the "retrieve" function (https://github.com/moodle/moodle/blob/master/analytics/classes/calculable.php#L142) can return "false", and the calling code does not do the necessary checks if it returns "false".
      Example: https://github.com/moodle/moodle/blob/master/course/classes/analytics/target/course_enrolments.php#L177

      It is therefore necessary to add the appropriate checks.

      Kind regards,

      Olivier

            Unassigned Unassigned
            Trolli Olivier Piton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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