diff options
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r-- | includes/bootstrap.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 104aa708a..fead4c684 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -1717,6 +1717,9 @@ function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NO if (!$in_error_state && function_exists('module_implements')) { $in_error_state = TRUE; + // The user object may not exist in all conditions, so 0 is substituted if needed. + $user_uid = isset($user->uid) ? $user->uid : 0; + // Prepare the fields to be logged $log_entry = array( 'type' => $type, @@ -1725,6 +1728,7 @@ function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NO 'severity' => $severity, 'link' => $link, 'user' => $user, + 'uid' => $user_uid, 'request_uri' => $base_root . request_uri(), 'referer' => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '', 'ip' => ip_address(), |