Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7d143aa

Browse files
committed
merged branch Seldaek/proctemp (PR #7066)
This PR was merged into the 2.1 branch. Commits ------- 5e8d844 [Process] Warn user with a useful message when tmpfile() failed Discussion ---------- [Process] Warn user with a useful message when tmpfile() failed Simple warning so users know what's going on instead of getting a proc_open error, see composer/composer#1581. Can't get the PR template since ~~symfony.com~~ my dns resolver is dead :)
2 parents 0209eb6 + 5e8d844 commit 7d143aa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Symfony/Component/Process/Process.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ public function start($callback = null)
213213
$this->fileHandles = array(
214214
self::STDOUT => tmpfile(),
215215
);
216+
if (false === $this->fileHandles[self::STDOUT]) {
217+
throw new RuntimeException('A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable');
218+
}
216219
$this->readBytes = array(
217220
self::STDOUT => 0,
218221
);

0 commit comments

Comments
 (0)