Skip to content

Commit 4832ead

Browse files
aidvutsadpbb
andauthored
Fix warning in main.php for PHP 8+ (#1014)
* Fix PHP Warning in main.php for PHP 8+ ``` PHP Warning: Undefined array key "REMOTE_USER" in /usr/local/nagios/share/main.php on line 29 ``` * Update html/main.php props @tsadpbb Co-authored-by: tsadpbb <90269351+tsadpbb@users.noreply.github.com> * Update main.php Missed a parenthesis. :) --------- Co-authored-by: tsadpbb <90269351+tsadpbb@users.noreply.github.com>
1 parent 9753a1d commit 4832ead

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

html/main.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"Click here to watch the entire Nagios Core 4 Tour!</a>";
2727
<?php } ?>
2828
$(document).ready(function() {
29-
var user = "<?php echo htmlspecialchars($_SERVER['REMOTE_USER']); ?>";
29+
var user = "<?php echo htmlspecialchars($_SERVER['REMOTE_USER'] ?? ''); ?>";
3030

3131
<?php if ($cfg["enable_page_tour"]) { ?>
3232
vBoxId += ";" + user;

0 commit comments

Comments
 (0)