8000 bug #47073 [HttpKernel] Fix non-scalar check in surrogate fragment re… · symfony/symfony@03bdaed · GitHub
[go: up one dir, main page]

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)
0