Skip to content

Sanitize product/category data #59

Open
@stfnschrmr

Description

@stfnschrmr

PHP Version

8.1

Shopware Version

5.7.16

Expected behaviour

No error 500.

Actual behaviour

Some categories were throwing a error 500 when using WbmTagManger is active.
We were able to trace it back to leftover line breaks \n in product titles. (For your information, the products were imported via an importer from a CSV file provided by the customer).

The error occurred at the following location:

array_walk_recursive($dataLayer, [$this, 'castArrayValues']);

(Yes, actually you should avoid the error beforehand by cleaning the data during import - but double is better).

How to reproduce in a demoshop

Put some \n s into product title

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions