Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize product/category data #59

Open
createdwithlove opened this issue Jan 11, 2023 · 0 comments
Open

Sanitize product/category data #59

createdwithlove opened this issue Jan 11, 2023 · 0 comments

Comments

@createdwithlove
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant