Skip to content

Commit

Permalink
Fix FPM tester $scriptName logic
Browse files Browse the repository at this point in the history
  • Loading branch information
bukka committed Mar 17, 2023
1 parent 38d2e7e commit 7d987eb
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions sapi/fpm/tests/tester.inc
Original file line number Diff line number Diff line change
Expand Up @@ -586,17 +586,14 @@ class Tester
string $scriptName = null,
?string $stdin = null
): array {
if (is_null($scriptFilename) && is_null($uri)) {
if (is_null($scriptFilename)) {
$scriptFilename = $this->makeSourceFile();
} else {
if (is_null($scriptFilename)) {
$scriptFilename = $uri;
} elseif (is_null($scriptName)) {
$scriptName = $uri;
}
}
if (is_null($uri)) {
$uri = '/' . basename($scriptFilename);
}
if (is_null($scriptName)) {
$scriptName = '/' . basename($scriptFilename);
$scriptName = $uri;
}

$params = array_merge(
Expand Down

0 comments on commit 7d987eb

Please sign in to comment.