Skip to content

Commit 7607db4

Browse files
Merge branch '4.4' into 5.1
* 4.4: [DI] fix dumping env vars [HttpClient] skip executing the multi handle when it's freed already [HttpClient] fix using freed curl resource at destruct time [HttpClient] shutdown verbose output from curl at destruction fix warning for preloading TranslatorTrait class [Typography] Remove unneeded description comments
2 parents 0ea6523 + 81fe862 commit 7607db4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dumper/PhpDumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,7 @@ private function addDefaultParametersMethod(): string
14791479
$export = $this->exportParameters([$value]);
14801480
$export = explode('0 => ', substr(rtrim($export, " ]\n"), 2, -1), 2);
14811481

1482-
if (preg_match("/\\\$this->(?:getEnv\('(?:\w++:)*+\w++'\)|targetDir\.'')/", $export[1])) {
1482+
if (preg_match("/\\\$this->(?:getEnv\('(?:[-.\w]*+:)*+\w++'\)|targetDir\.'')/", $export[1])) {
14831483
$dynamicPhp[$key] = sprintf('%scase %s: $value = %s; break;', $export[0], $this->export($key), $export[1]);
14841484
} else {
14851485
$php[] = sprintf('%s%s => %s,', $export[0], $this->export($key), $export[1]);
@@ -1885,7 +1885,7 @@ private function dumpParameter(string $name): string
18851885
return $dumpedValue;
18861886
}
18871887

1888-
if (!preg_match("/\\\$this->(?:getEnv\('(?:\w++:)*+\w++'\)|targetDir\.'')/", $dumpedValue)) {
1888+
if (!preg_match("/\\\$this->(?:getEnv\('(?:[-.\w]*+:)*+\w++'\)|targetDir\.'')/", $dumpedValue)) {
18891889
return sprintf('$this->parameters[%s]', $this->doExport($name));
18901890
}
18911891
}

0 commit comments

Comments
 (0)