Skip to content

Commit

Permalink
weblib MDL-19196 Added guard around call to error_get_last to prevent…
Browse files Browse the repository at this point in the history
… error if running old php
  • Loading branch information
Andrew Davis committed Nov 18, 2009
1 parent 3f226cc commit 2871c45
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/weblib.php
Expand Up @@ -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));

Expand Down

0 comments on commit 2871c45

Please sign in to comment.