From dfe73ba8e1435865bd759566f59458d7123b1f47 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Fri, 30 Oct 2009 13:29:14 +0000 Subject: [PATCH] MDL-20677 simplified debugging of deprecated use of error() --- lib/deprecatedlib.php | 2 +- lib/outputrenderers.php | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index 731ae5e97a..233d684522 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -585,7 +585,7 @@ function get_current_group($courseid, $full = false) { * @return void, always throws moodle_exception */ function error($message, $link='') { - throw new moodle_exception('notlocalisederrormessage', 'error', $link, $message); + throw new moodle_exception('notlocalisederrormessage', 'error', $link, $message, 'error() is a deprecated function, please call print_error() instead of error()'); } diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 407586f768..c1f34e937d 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -1940,10 +1940,6 @@ class moodle_core_renderer extends moodle_renderer_base { get_string('moreinformation') . '

'; $output .= $this->box($message, 'errorbox'); - if ($showerrordebugwarning) { - $output .= $this->notification('error() is a deprecated function. ' . - 'Please call print_error() instead of error()', 'notifytiny'); - } if (!empty($debuginfo)) { $output .= $this->notification($debuginfo, 'notifytiny'); } -- 2.39.5