Skip to content

Commit

Permalink
Porting #5186 - Fatal Error
Browse files Browse the repository at this point in the history
Array intersect does now work when the second parameter is null
  • Loading branch information
TheWitness committed Jan 22, 2023
1 parent 6ddb2e4 commit 5fc2ace
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7755,7 +7755,7 @@ function get_client_addr():string|false {
*/
if ($proxy_headers === true) {
$proxy_headers = $allowed_proxy_headers;
} elseif (is_array($proxy_headers)) {
} elseif (is_array($proxy_headers) && is_array($allowed_proxy_headers)) {
$proxy_headers = array_intersect($proxy_headers, $allowed_proxy_headers);
}

Expand Down

0 comments on commit 5fc2ace

Please sign in to comment.