Permalink
Browse files

[Process] minor fixes

  • Loading branch information...
1 parent 7ee758c commit f03e5dcd40a88e344bacb9810b5c34369dd4f62e @aeryaguzov aeryaguzov committed with fabpot Feb 21, 2014
Showing with 8 additions and 2 deletions.
  1. +4 −1 src/Symfony/Component/Process/Process.php
  2. +4 −1 src/Symfony/Component/Process/ProcessPipes.php
@@ -812,7 +812,9 @@ public function getEnv()
public function setEnv(array $env)
{
// Process can not handle env values that are arrays
- $env = array_filter($env, function ($value) { if (!is_array($value)) { return true; } });
+ $env = array_filter($env, function ($value) {
+ return !is_array($value);
+ });
$this->env = array();
foreach ($env as $key => $value) {
@@ -1038,6 +1040,7 @@ protected function isSigchildEnabled()
* Reads pipes, executes callback.
*
* @param Boolean $blocking Whether to use blocking calls or not.
+ * @param Boolean $close Whether to close file handles or not.
*/
private function readPipes($blocking, $close)
{
@@ -76,7 +76,7 @@ public function unblock()
public function close()
{
$this->closeUnixPipes();
- foreach ($this->fileHandles as $offset => $handle) {
+ foreach ($this->fileHandles as $handle) {
fclose($handle);
}
$this->fileHandles = array();
@@ -218,6 +218,8 @@ public function write($blocking, $stdin)
/**
* Reads data in file handles.
*
+ * @param Boolean $close Whether to close file handles or not.
+ *
* @return array An array of read data indexed by their fd.
*/
private function readFileHandles($close = false)
@@ -253,6 +255,7 @@ private function readFileHandles($close = false)
* Reads data in file pipes streams.
*
* @param Boolean $blocking Whether to use blocking calls or not.
+ * @param Boolean $close Whether to close file handles or not.
*
* @return array An array of read data indexed by their fd.
*/

0 comments on commit f03e5dc

Please sign in to comment.