Skip to content

Commit

Permalink
check if ['SERVER_NAME'] is set
Browse files Browse the repository at this point in the history
When running from CLI (eg for tests), ['SERVER_NAME'] is not set.
Check its presence to avoir missing array key
  • Loading branch information
tenzap authored and f3l1x committed Feb 8, 2025
1 parent be63630 commit 96cf200
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nusoap.php
Original file line number Diff line number Diff line change
Expand Up @@ -4652,7 +4652,7 @@ function configureWSDL($serviceName, $namespace = false, $endpoint = false, $sty
{
global $HTTP_SERVER_VARS;

if (isset($_SERVER)) {
if (isset($_SERVER['SERVER_NAME'])) {
$SERVER_NAME = $_SERVER['SERVER_NAME'];
$SERVER_PORT = $_SERVER['SERVER_PORT'];
$SCRIPT_NAME = $_SERVER['SCRIPT_NAME'];
Expand Down

0 comments on commit 96cf200

Please sign in to comment.