Skip to content

Deprecated function get_context_instance() used in locallib.php #268

@saidisalem

Description

@saidisalem

File: locallib.php
Line: 533
Affected Moodle version: 4.4+ (or latest)

The function get_context_instance() has been fully removed in recent Moodle versions (4.4+), and is still used as a fallback inside cr_get_context():
line 533 of locallib.php

return get_context_instance($context, $id, $strictness);

This fallback will now throw a coding_exception and break functionality in any call to cr_get_context() with an unrecognized context type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions