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

Commit ae8f886

Browse files
committed
bug #138 Added a additional check if the posix extension is loaded (jdecoster)
This PR was merged into the 1.0-dev branch. Discussion ---------- Added a additional check if the posix extension is loaded Added a check to prevent a thrown exception when the posix extension is not loaded in php.ini Commits ------- 31030e7 Added a additional check if the posix extension is loaded
2 parents 7f920fa + 31030e7 commit ae8f886

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)