From: stronk7 Date: Tue, 15 Apr 2008 21:32:06 +0000 (+0000) Subject: Correct usage of debugging. MDL-11893 ; merged from 19_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=252720c45af7ab5a58c5d6ae5242c43210553e1e;p=moodle.git Correct usage of debugging. MDL-11893 ; merged from 19_STABLE --- diff --git a/lib/datalib.php b/lib/datalib.php index 796b721a92..287dd63716 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -1934,8 +1934,8 @@ function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user } } - if (!$result and debugging()) { - echo '

Error: Could not insert a new entry to the Moodle log

'; // Don't throw an error + if (!$result) { + debugging('Error: Could not insert a new entry to the Moodle log', DEBUG_ALL); } /// Store lastaccess times for the current user, do not use in cron and other commandline scripts