Explorar o código

Tweak logic in case of dirty state start-up, refs #5668

Jordi Boggiano %!s(int64=8) %!d(string=hai) anos
pai
achega
8de10dd159
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/Composer/XdebugHandler.php

+ 4 - 0
src/Composer/XdebugHandler.php

@@ -219,6 +219,10 @@ class XdebugHandler
             $currentIniScanDir = getenv(self::ENV_INI_SCAN_DIR);
             if ($currentIniScanDir) {
                 putenv(self::ENV_INI_SCAN_DIR_OLD.'='.$currentIniScanDir);
+            } else {
+                // make sure the env var does not exist if none is to be set
+                // otherwise the child process will reset it incorrectly
+                putenv(self::ENV_INI_SCAN_DIR_OLD);
             }
 
             if (!putenv(self::ENV_INI_SCAN_DIR.'='.$this->scanDir)) {