mirror of
https://github.com/moodle/moodle.git
synced 2025-07-09 16:36:28 +02:00
MDL-8384 debugdisplay does not respect original value of display_errors
This commit is contained in:
@ -2579,7 +2579,8 @@ class admin_setting_special_debugdisplay extends admin_setting_configcheckbox {
|
|||||||
$name = 'debugdisplay';
|
$name = 'debugdisplay';
|
||||||
$visiblename = get_string('debugdisplay', 'admin');
|
$visiblename = get_string('debugdisplay', 'admin');
|
||||||
$description = get_string('configdebugdisplay', 'admin');
|
$description = get_string('configdebugdisplay', 'admin');
|
||||||
parent::admin_setting_configcheckbox($name, $visiblename, $description, '');
|
$default = ini_get('display_errors');
|
||||||
|
parent::admin_setting_configcheckbox($name, $visiblename, $description, $default);
|
||||||
}
|
}
|
||||||
|
|
||||||
function write_setting($data) {
|
function write_setting($data) {
|
||||||
@ -2594,7 +2595,7 @@ class admin_setting_special_debugdisplay extends admin_setting_configcheckbox {
|
|||||||
function output_html() {
|
function output_html() {
|
||||||
|
|
||||||
if ($this->get_setting() === NULL) {
|
if ($this->get_setting() === NULL) {
|
||||||
$currentsetting = ini_get('display_error');
|
$currentsetting = $this->defaultsetting;
|
||||||
} else {
|
} else {
|
||||||
$currentsetting = $this->get_setting();
|
$currentsetting = $this->get_setting();
|
||||||
}
|
}
|
||||||
|
@ -258,7 +258,9 @@ global $HTTPSPAGEREQUIRED;
|
|||||||
|
|
||||||
|
|
||||||
/// If we want to display Moodle errors, then try and set PHP errors to match
|
/// If we want to display Moodle errors, then try and set PHP errors to match
|
||||||
if (empty($CFG->debugdisplay)) {
|
if (!isset($CFG->debugdisplay)) {
|
||||||
|
//keep it as is during installation
|
||||||
|
} else if (empty($CFG->debugdisplay)) {
|
||||||
@ini_set('display_errors', '0');
|
@ini_set('display_errors', '0');
|
||||||
@ini_set('log_errors', '1');
|
@ini_set('log_errors', '1');
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user