Skip to content

Commit

Permalink
QA: Add Username to Page Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWitness committed Feb 7, 2024
1 parent 0c9e776 commit 82b5f68
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion help.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@
$page = basename(get_nfilter_request_var('page'));
$error = get_filter_request_var('error');

$message = sprintf('WARNING: Page:%s Generated a Fatal Error:%d', $page, $error);
if (isset($_SESSION['sess_user_id'])) {
$username = get_username($_SESSION['sess_user_id']);
} else {
$username = 'unknown';
}

$message = sprintf('WARNING: Page:%s Generated a Fatal Error:%d for User:%s', $page, $error, $username);

cacti_log($message, false);

Expand Down

0 comments on commit 82b5f68

Please sign in to comment.