Details
Description
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