浏览代码

Merge remote branch 'symfony/master' into experimental

Bernhard Schussek 14 年之前
父节点
当前提交
0fb95c18ad
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      src/Symfony/Component/Process/PhpProcess.php

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

@@ -78,8 +78,8 @@ class PhpProcess extends Process
      */
     private function getPhpBinary()
     {
-        if (getenv('PHP_PATH')) {
-            if (!is_executable($php = getenv('PHP_PATH'))) {
+        if ($php = getenv('PHP_PATH')) {
+            if (!is_executable($php)) {
                 throw new \RuntimeException('The defined PHP_PATH environment variable is not a valid PHP executable.');
             }
 
@@ -93,6 +93,12 @@ class PhpProcess extends Process
             }
         }
 
+        if ($php = getenv('PHP_PEAR_PHP_BIN')) {
+            if (is_executable($php)) {
+                return $php;
+            }
+        }
+
         throw new \RuntimeException('Unable to find the PHP executable.');
     }
 }