Browse files

Merge branch '2.2'

* 2.2: (22 commits)
  [Process] Fix regression introduced in #6620 / 880da01c49a9255f5022ab7e18bca38c18f56370, fixes #7082
  [HttpKernel] added a unit for the previous commit (closes #7025)
  [HttpFoundation] fixed, overwritten CONTENT_TYPE
  [BrowserKit] fixed test added in the previous merge (refs #7059)
  [FrameworkBundle] tweaked reference dumper command (see #7093)
  Remove unnecessary comment and change test name
  [Config] tweaked dumper to indent multi-line info
  [HttpKernel] added some tests for previous merge
  Fix REMOTE_ADDR for cached subrequests
  [FrameworkBundle] CSRF should be on by default
  [WebProfilerBundle] removed dependency on FrameworkBundle (closes #6949)
  [HttpKernel] added error display suppression when using the ErrorHandler (if not, errors are displayed twice, refs #6254)
  [HttpFoundation] tweaked previous merge
  [HttpFoundation] Added getter for httpMethodParameterOverride state
  Create validators.lv.xlf
  [Process] Warn user with a useful message when tmpfile() failed
  [BrowserKit] added a test to make sure HTTP authentication is preserved when submitting a form
  Remove array type hint from GetResponseForControllerResultEvent::setControllerResult()
  bumped Symfony version to 2.2.0-DEV
  Revert "merged branch povilas/issue_6101 (PR #6708)"
  ...
  • Loading branch information...
2 parents c99475d + dd5c62d commit 6ebe4ba544cfc0dd25bfe49402da4d5267ee1b43 @fabpot fabpot committed Feb 18, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 Process.php
View
7 Process.php
@@ -131,6 +131,10 @@ public function __construct($commandline, $cwd = null, array $env = null, $stdin
$this->commandline = $commandline;
$this->cwd = $cwd;
+ // on windows, if the cwd changed via chdir(), proc_open defaults to the dir where php was started
+ if (null === $this->cwd && defined('PHP_WINDOWS_VERSION_BUILD')) {
+ $this->cwd = getcwd();
+ }
if (null !== $env) {
$this->env = array();
foreach ($env as $key => $value) {
@@ -232,6 +236,9 @@ public function start($callback = null)
$this->fileHandles = array(
self::STDOUT => tmpfile(),
);
+ if (false === $this->fileHandles[self::STDOUT]) {
+ throw new RuntimeException('A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable');
+ }
$this->readBytes = array(
self::STDOUT => 0,
);

0 comments on commit 6ebe4ba

Please sign in to comment.