Skip to content

Totara branch throws an exception during shutdown, due to calling "get_session_lock_info()" function that isn't present in Totara prior to 19.1 #421

@agwells

Description

@agwells

To replicate:

  1. Clean install of Totara (17, 18, or 19) with the plugin from the TOTARA_19 branch
  2. Go to admin/settings.php?section=tool_excimer and set "Minimum request duration" to "1"
  3. Go to admin/tool/excimer/recent.php
  • Expected result: Each page load should be logged
  • Actual result:
    • None of the page loads are logged
    • Error log shows message "Exception ignored in shutdown function Closure::__invoke: Call to undefined method core\session\manager::get_session_lock_info()"

The problem is that script_metadata::get_lock_info() tries to call \core\session\manager::get_session_lock_info(), but this function isn't present in Totara. It was added to Moodle after Totara forked away.

The quick fix is to just make script_metadata::get_lock_info() return an empty array, in which case the request is logged without any log info.

Totara 19.1 actually includes this plugin as part of core, and they've patched the session manager to include a get_session_lock_info() function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions