Skip to content

Commit 1f9b46b

Browse files
committed
Merge branch '3.4' into 4.3
* 3.4: Avoid stale-if-error if kernel.debug = true, because it hides errors [Console] Fix SymfonyQuestionHelper tests sometimes failing on AppVeyor [DI] deferred exceptions in ResolveParameterPlaceHoldersPass
2 parents 08c2b9a + 56596df commit 1f9b46b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

HttpCache/HttpCache.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,14 @@ public function __construct(KernelInterface $kernel, string $cacheDir = null)
3737
$this->kernel = $kernel;
3838
$this->cacheDir = $cacheDir;
3939

40-
parent::__construct($kernel, $this->createStore(), $this->createSurrogate(), array_merge(['debug' => $kernel->isDebug()], $this->getOptions()));
40+
$isDebug = $kernel->isDebug();
41+
$options = ['debug' => $isDebug];
42+
43+
if ($isDebug) {
44+
$options['stale_if_error'] = 0;
45+
}
46+
47+
parent::__construct($kernel, $this->createStore(), $this->createSurrogate(), array_merge($options, $this->getOptions()));
4148
}
4249

4350
/**

0 commit comments

Comments
 (0)