Skip to content

Commit 03bdaed

Browse files
bug #47073 [HttpKernel] Fix non-scalar check in surrogate fragment renderer (aschempp)
This PR was merged into the 4.4 branch. Discussion ---------- [HttpKernel] Fix non-scalar check in surrogate fragment renderer | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #46152 | License | MIT | Doc PR | - Commits ------- 6b85cfd [HttpKernel] Fix non-scalar check in surrogate fragment renderer
2 parents 9fb7f20 + 6b85cfd commit 03bdaed

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Symfony/Component/HttpKernel/Fragment/AbstractSurrogateFragmentRenderer.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,11 @@ private function generateSignedFragmentUri(ControllerReference $uri, Request $re
9696
private function containsNonScalars(array $values): bool
9797
{
9898
foreach ($values as $value) {
99-
if (\is_array($value)) {
100-
return $this->containsNonScalars($value);
101-
} elseif (!\is_scalar($value) && null !== $value) {
99+
if (\is_scalar($value) || null === $value) {
100+
continue;
101+
}
102+
103+
if (!\is_array($value) || $this->containsNonScalars($value)) {
102104
return true;
103105
}
104106
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy