From 8de10dd159ac1eba199c50f69ffffcc96a34be58 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 12 Sep 2016 16:58:30 +0200 Subject: [PATCH] Tweak logic in case of dirty state start-up, refs #5668 --- src/Composer/XdebugHandler.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Composer/XdebugHandler.php b/src/Composer/XdebugHandler.php index 843784b4c..ef8acb9e6 100644 --- a/src/Composer/XdebugHandler.php +++ b/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)) {