Skip to content

Commit

Permalink
Correct issue with PHP 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
netniV committed Dec 5, 2022
1 parent 7f0e163 commit a8d59e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/global.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
}

/* Should we allow proxy ip headers? */
$config['proxy_headers'] = $proxy_headers ?? null;
$config['proxy_headers'] = (isset($proxy_headers) ? $proxy_headers : null);

/* Set the poller_id */
if (isset($poller_id)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6725,7 +6725,7 @@ function get_debug_prefix() {
function get_client_addr() {
global $config, $allowed_proxy_headers;

$proxy_headers = $config['proxy_headers'] ?? null;
$proxy_headers = (isset($config['proxy_headers']) ? $config['proxy_headers'] : null);
if ($proxy_headers === null) {
$last_time = read_config_option('proxy_alert');
if (empty($last_time)) {
Expand Down

0 comments on commit a8d59e8

Please sign in to comment.