1
0
Fork 0

tentative fix for #5667

pull/5668/head
Rob Bast 2016-09-12 16:08:50 +02:00
parent 754d4fa1b2
commit 547616e96b
No known key found for this signature in database
GPG Key ID: 73076E35E6165F39
1 changed files with 14 additions and 0 deletions

View File

@ -49,6 +49,14 @@ class XdebugHandler
public function check()
{
if (!$this->needsRestart()) {
$iniScanDir = getenv('PHP_INI_SCAN_DIR_OLD');
if ($iniScanDir) {
putenv('PHP_INI_SCAN_DIR=' . $iniScanDir);
} else {
putenv('PHP_INI_SCAN_DIR');
}
return;
}
@ -204,6 +212,12 @@ class XdebugHandler
if (!file_exists($this->scanDir) && !@mkdir($this->scanDir, 0777)) {
return;
}
$iniScanDirEnv = getenv('PHP_INI_SCAN_DIR');
if ($iniScanDirEnv) {
putenv('PHP_INI_SCAN_DIR_OLD='.$iniScanDirEnv);
}
if (!putenv('PHP_INI_SCAN_DIR='.$this->scanDir)) {
return;
}