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

check_hint_file_access() should make sure $hint is not null before accessing its id

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.4.8, 4.5.4
    • 4.3.10, 4.4.6, 4.5.2
    • Questions

      The function check_hint_file_access in questionbase.php fetches the applicable hint from the behaviour and compares its ID to the one supplied by the caller. However, get_applicable_hint may return null, so accessing the ID will lead to a warning.

      I suggest checking that $hint is not null, before trying to access the ID.

            philippimhof Philipp Imhof
            philippimhof Philipp Imhof
            Andrew Gosali Andrew Gosali
            Tim Hunt Tim Hunt
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 15 minutes
                1h 15m

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