Merge branch 'w30_MDL-40795_m26_ajaxerrordisplay' of https://github.com/skodak/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2013-07-22 18:56:40 +02:00
commit 59af378baf

View File

@ -183,7 +183,13 @@ ini_set('precision', 14); // needed for upgrades and gradebook
// please note it must be defined before including the config.php script
// and in some cases you also need to set custom default exception handler
if (!defined('NO_DEBUG_DISPLAY')) {
if (defined('AJAX_SCRIPT') and AJAX_SCRIPT) {
// Moodle AJAX scripts are expected to return json data, any PHP notices or errors break it badly,
// developers simply must learn to watch error log.
define('NO_DEBUG_DISPLAY', true);
} else {
define('NO_DEBUG_DISPLAY', false);
}
}
// Some scripts such as upgrade may want to prevent output buffering