Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-20676 Error, exception and debug handling improvements
  3. MDL-20577

print_error() displays nothing when in not in DEBUG_DEVELOPER mode

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      print_error() is currently being used by a number of functions which arguably give useful output to the user even when not in developer debug mode (e.g. required_param??)

      This displays output
      <?php

      require_once('config.php');
      $CFG->debug = DEBUG_DEVELOPER;

      print_error('displayme');
      ?>

      This doesn't:
      <?php

      require_once('config.php');
      $CFG->debug = 0;

      print_error('displayme');
      ?>

      And consequently neither does this without a parameter:
      <?php

      require_once('config.php');
      $CFG->debug = 0;

      required_param('foo', PARAM_INT);
      ?>

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            poltawski Dan Poltawski
            Tester:
            Nobody
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              24/Nov/10