From: Petr Skoda Date: Sat, 31 Oct 2009 22:11:16 +0000 (+0000) Subject: MDL-20695 can not use trigger_error() for informing users about problems in config... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ccda6d686660d7cfb44480642bdbfaf02ceaca80;p=moodle.git MDL-20695 can not use trigger_error() for informing users about problems in config.php, no need to log these --- diff --git a/lib/setup.php b/lib/setup.php index 18eb6c28e2..7ec63887c5 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -168,11 +168,11 @@ if (!defined('NO_DEBUG_DISPLAY')) { define('NO_DEBUG_DISPLAY', false); } -/// wwwroot is mandatory - if (!isset($CFG->wwwroot)) { - trigger_error('Fatal: $CFG->wwwroot is not configured! Exiting.'); - die; - } +// wwwroot is mandatory +if (!isset($CFG->wwwroot)) { + // trigger_error() is not correct here, no need to log this + die('Fatal: $CFG->wwwroot is not configured! Exiting.'); +} /// Detect CLI scripts - CLI scripts are executed from command line, do not have session and we do not want HTML in output if (!defined('CLI_SCRIPT')) { // CLI_SCRIPT might be defined in 'fake' CLI scripts like admin/cron.php