Skip to content
Snippets Groups Projects
Commit fda71f80 authored by Yann's avatar Yann Committed by Stefan Bürk
Browse files

[BUGFIX] Mitigate a TypeError in `StandardContentPreviewRenderer`

An editor can trigger a TypeError exception leading to a 503 error
message `trim() expects parameter 1 to be string, null given` in
the backend page module by creating `menu_categorized_content`
objects with `selected_categories` and then turning them into
`menu_section` objects.

This change mitigates the type error by using a null-coalesce
fallback passing an invalid type to the `trim()` method in
`StandardContentPreviewRenderer::generateListForMenuContentTypes()`.

Resolves: #103052
Releases: main, 12.4, 11.5
Change-Id: I4c0ecbd20c7cdfee22fa324f6b80391be47a1b88
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82794


Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarBenjamin Franzke <ben@bnf.dev>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarBenjamin Franzke <ben@bnf.dev>
parent a883088e
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment