From 2871c45070d7dfea6ff9595b772eac94d2830975 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Wed, 18 Nov 2009 00:57:05 +0000 Subject: [PATCH] weblib MDL-19196 Added guard around call to error_get_last to prevent error if running old php --- lib/weblib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/weblib.php b/lib/weblib.php index 3046547a8e..48f2891839 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2738,7 +2738,9 @@ function redirect($url, $message='', $delay=-1) { $url = $SESSION->sid_process_url($url); } - $lasterror = error_get_last(); + if (function_exists('error_get_last')) { + $lasterror = error_get_last(); + } $debugdisableredirect = defined('DEBUGGING_PRINTED') || (!empty($CFG->debugdisplay) && !empty($lasterror) && ($lasterror['type'] & DEBUG_DEVELOPER)); -- 2.39.5