Commit 8e823e3a authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Make sure the session object is available if an error is to be logged

parent cf942573
......@@ -118,6 +118,10 @@ function log_environ ($message, $escape=true, $backtrace=true) {
*/
function log_message ($message, $loglevel, $escape, $backtrace, $file=null, $line=null, $trace=null) {
global $SESSION;
if (!$SESSION) {
require_once(get_config('docroot') . 'auth/lib.php');
$SESSION = Session::singleton();
}
static $loglevelnames = array(
LOG_LEVEL_ENVIRON => 'environ',
LOG_LEVEL_DBG => 'dbg',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment