Skip to content

Commit 3dedffa

Browse files
Merge branch '3.4' into 4.4
* 3.4: [Phpunit] Fix running skipped tests expecting only deprecations [DependencyInjection] #35505 Fix typo in test name [Yaml][Inline] Fail properly on empty object tag and empty const tag Check non-null type for numeric type Check value isset to avoid PHP notice bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form
2 parents afc96da + 70a1291 commit 3dedffa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Controller/TemplateController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ public function templateAction(string $template, int $maxAge = null, int $shared
5555
throw new \LogicException('You can not use the TemplateController if the Templating Component or the Twig Bundle are not available.');
5656
}
5757

58-
if ($maxAge) {
58+
if (null !== $maxAge) {
5959
$response->setMaxAge($maxAge);
6060
}
6161

62-
if ($sharedAge) {
62+
if (null !== $sharedAge) {
6363
$response->setSharedMaxAge($sharedAge);
6464
}
6565

6666
if ($private) {
6767
$response->setPrivate();
68-
} elseif (false === $private || (null === $private && ($maxAge || $sharedAge))) {
68+
} elseif (false === $private || (null === $private && (null !== $maxAge || null !== $sharedAge))) {
6969
$response->setPublic();
7070
}
7171

0 commit comments

Comments
 (0)