소스 검색

Only use Path if it is actually available, refs #5114

Jordi Boggiano 9 년 전
부모
커밋
f542b0f32d
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/Composer/EventDispatcher/EventDispatcher.php

+ 2 - 2
src/Composer/EventDispatcher/EventDispatcher.php

@@ -146,10 +146,10 @@ class EventDispatcher
     protected function doDispatch(Event $event)
     {
         $pathStr = 'PATH';
-        if (!isset($_SERVER[$pathStr])) {
+        if (!isset($_SERVER[$pathStr]) && isset($_SERVER['Path'])) {
             $pathStr = 'Path';
         }
-        
+
         // add the bin dir to the PATH to make local binaries of deps usable in scripts
         $binDir = $this->composer->getConfig()->get('bin-dir');
         if (is_dir($binDir)) {