Followup #89008, PHP type errors and stale workspace page language cache
A followup for #89008 is required to fix potential PHP type erors (int required, null passed) and to avoid a stale language cache (page ID given when reading, cached once, not refreshed if called with different page ID).
[BUGFIX] Prevent PHP type error and stale language cache
In EXT:workspaces, as consequence of changes in #89008,
PHP is raising an error if $pageId cannot be resolved to an
integer value as required by method signature.
Additionally, an internally cached array is built based on a
dynamic value but the internal cache is not keyed by this
value or flushed when the value changes.
- Casts an unresolved page ID to integer zero.
- Removes the internal cache of languages since the array
now depends entirely on a unique input value, $pageId.
Tested-by: Andreas Fernandez <firstname.lastname@example.org>
Tested-by: TYPO3com <email@example.com>
Tested-by: Susanne Moog <firstname.lastname@example.org>
Reviewed-by: Andreas Fernandez <email@example.com>
Reviewed-by: Susanne Moog <firstname.lastname@example.org>
#2 Updated by Gerrit Code Review 2 months ago
- Status changed from New to Under Review
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62308
#5 Updated by Gerrit Code Review 4 days ago
- Status changed from Closed to Under Review
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62974