Explorar el Código

Only work with the cli sapi

stealth35 hace 13 años
padre
commit
caa44aefc1
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/Symfony/Component/Process/PhpExecutableFinder.php

+ 2 - 1
src/Symfony/Component/Process/PhpExecutableFinder.php

@@ -33,7 +33,8 @@ class PhpExecutableFinder
      */
     public function find()
     {
-        if (defined('PHP_BINARY') && PHP_BINARY && ('php' === pathinfo(PHP_BINARY, PATHINFO_FILENAME))) {
+        // PHP_BINARY return the current sapi executable
+        if (defined('PHP_BINARY') && PHP_BINARY && ('cli' === PHP_SAPI)) {
             return PHP_BINARY;
         }