Details
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);
?>
Yeah, confirmed.
Under 2.0 it calls:
$OUTPUT->fatal_error()
that has one explicit:
if (!debugging('', DEBUG_DEVELOPER)) {
return false;
}
IMO we are mixing things here, user-level errors and developers info. This needs to be clarified asap IMO.
Ciao