Skip to content

Commit

Permalink
fix: Handle the case where SERVER['PWD'] is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed Oct 13, 2023
1 parent 1a4e2af commit 5af9ee6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ParallelExecutorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ private static function getNoopClosure(): Closure

private static function getScriptPath(): string
{
$pwd = $_SERVER['PWD'];
$pwd = $_SERVER['PWD'] ?? '';
$scriptName = $_SERVER['SCRIPT_NAME'];

return str_starts_with($scriptName, $pwd)
Expand Down

0 comments on commit 5af9ee6

Please sign in to comment.