From 1b54fb36ba7ffa871d2ace8d5f4c7233973dcc45 Mon Sep 17 00:00:00 2001 From: vyshane Date: Mon, 25 Sep 2006 02:44:54 +0000 Subject: [PATCH] Error printing for cron should be done with mtrace() --- lib/weblib.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index 2861d4af85..ef60e789e3 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -4419,7 +4419,15 @@ function print_scale_menu_helpbutton($courseid, $scale, $return=false) { * @param string $link The url where the user will be prompted to continue. If no url is provided the user will be directed to the site index page. */ function error ($message, $link='') { + global $CFG, $SESSION; + $message = clean_text($message); // In case nasties are in here + + if (defined('FULLME') && FULLME == 'cron') { + // Errors in cron should be mtrace'd. + mtrace($message); + die; + } if (! defined('HEADER_PRINTED')) { //header not yet printed @@ -4428,9 +4436,6 @@ function error ($message, $link='') { } echo '
'; - - $message = clean_text($message); // In case nasties are in here - print_simple_box($message, '', '', '', '', 'errorbox'); // in case we are logging upgrade in admin/index.php stop it -- 2.39.5