Skip to content
This repository was archived by the owner on Nov 14, 2019. It is now read-only.

Commit 31030e7

Browse files
committed
Added a additional check if the posix extension is loaded
Added a check to prevent a thrown exception when the posix is not loaded in php.ini
1 parent 7f920fa commit 31030e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Installer/NewCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ protected function generateComposerProjectName()
364364

365365
if (!empty($_SERVER['USERNAME'])) {
366366
$name = $_SERVER['USERNAME'].'/'.$name;
367-
} elseif ($user = posix_getpwuid(posix_getuid())) {
367+
} elseif (true === extension_loaded('posix') && $user = posix_getpwuid(posix_getuid())) {
368368
$name = $user['name'].'/'.$name;
369369
} elseif (get_current_user()) {
370370
$name = get_current_user().'/'.$name;

0 commit comments

Comments
 (0)