Skip to content

Commit 0e10f20

Browse files
cbywaterlstrojny
authored andcommitted
Fix error when absolute path contains spaces (#43)
1 parent f7e727d commit 0e10f20

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Server.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ public function __construct($port, $host)
2121
$this->port = $port;
2222
$this->host = $host;
2323
$packageRoot = __DIR__ . '/../';
24+
$packagePath = escapeshellarg($packageRoot . 'public/index.php');
2425
parent::__construct(
2526
sprintf(
26-
'exec php -dalways_populate_raw_post_data=-1 -derror_log= -S %s -t public/ %spublic/index.php',
27+
'exec php -dalways_populate_raw_post_data=-1 -derror_log= -S %s -t public/ %s',
2728
$this->getConnectionString(),
28-
$packageRoot
29+
$packagePath
2930
),
3031
$packageRoot
3132
);

0 commit comments

Comments
 (0)