浏览代码

[Process] fixed previous commit

Fabien Potencier 14 年之前
父节点
当前提交
7280da8af2
共有 2 个文件被更改,包括 7 次插入2 次删除
  1. 2 2
      src/Symfony/Component/Process/PhpProcess.php
  2. 5 0
      src/Symfony/Component/Process/Process.php

+ 2 - 2
src/Symfony/Component/Process/PhpProcess.php

@@ -62,8 +62,8 @@ class PhpProcess extends Process
      */
     public function run($callback = null)
     {
-        if (null === $this->commandline) {
-            $this->commandline = $this->getPhpBinary();
+        if (null === $this->getCommandLine()) {
+            $this->setCommandLine($this->getPhpBinary());
         }
 
         return parent::run($callback);

+ 5 - 0
src/Symfony/Component/Process/Process.php

@@ -284,6 +284,11 @@ class Process
         $this->stderr .= $line;
     }
 
+    public function getCommandLine()
+    {
+        return $this->commandline;
+    }
+
     public function setCommandLine($commandline)
     {
         $this->commandline = $commandline;