Skip to content

[HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice #25191

Closed
@emodric

Description

@emodric
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.1

AbstractSurrogateFragmentRenderer::containsNonScalars checks if URI attributes passed to ESI fragment renderer contain objects and if so, throws a deprecation notice. As I understand, arrays with scalar values should also be accepted, however, the method fails with arrays that contain pure scalar values.

It seems to me that the first if condition in the method should be:

if (is_array($value)) {
    return $this->containsNonScalars($value);
}

rather than:

if (is_array($value) && $this->containsNonScalars($value)) {
    return true;
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions