Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-5566

Verify some deprecated debugging uses

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.8.2
    • Fix Version/s: None
    • Component/s: Local: Code checker
    • Labels:
      None
    • Affected Branches:
      MOODLE_28_STABLE

      Description

      With MDL-39474 some changes about how to detect DEBUG_DEVELOPER were performed.

      So, for 2.6 and upwards:

      • Warnings:
        • It's recommended to use $CFG->debugdeveloper instead of debugging(..., DEBUG_DEVELOPER) to check for DEBUG_DEVELOPER level.
      • Errors:
        • It's forbidden to set $CFG->debug in PHP code (but some exceptions in installers and friends). Instead set_debugging() must be used.
        • Never set $CFG->debugdeveloper in code.

      It would be nice to have these covered by the code checker.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: