Skip to content

Commit

Permalink
Fix undefined array key when argv doesn't exists
Browse files Browse the repository at this point in the history
  • Loading branch information
BafS authored and bobthecow committed Jul 28, 2023
1 parent 1724cef commit 7b7cd62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Readline/Hoa/Protocol.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static function getInstance(): self
protected function initialize()
{
$root = \dirname(__DIR__, 3);
$argv0 = \realpath($_SERVER['argv'][0]);
$argv0 = isset($_SERVER['argv'][0]) ? \realpath($_SERVER['argv'][0]) : false;

$cwd =
'cli' === \PHP_SAPI
Expand Down

0 comments on commit 7b7cd62

Please sign in to comment.