mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
weblib MDL-19196 Added guard around call to error_get_last to prevent error if running old php
This commit is contained in:
parent
3f226cc99f
commit
2871c45070
@ -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));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user