Skip to content

Commit 7f9ba8d

Browse files
authored
Check for absolute path on script name
1 parent 4a0125f commit 7f9ba8d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ParallelExecutorFactory.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ private static function getScriptPath(): string
340340
$pwd = $_SERVER['PWD'];
341341
$scriptName = $_SERVER['SCRIPT_NAME'];
342342

343-
return str_starts_with($scriptName, $pwd)
343+
return (str_starts_with($scriptName, $pwd)
344+
|| str_starts_with($scriptName, DIRECTORY_SEPARATOR))
344345
? $scriptName
345346
: $pwd.DIRECTORY_SEPARATOR.$scriptName;
346347
}

0 commit comments

Comments
 (0)