Skip to content
Snippets Groups Projects
Commit 034baf30 authored by Claus Due's avatar Claus Due Committed by Susanne Moog
Browse files

[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.

This patch:

* 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.

Resolves: #89692
Related: #89008
Releases: master
Change-Id: I3d74b4c7575375aae23a7e2473100104c4700966
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62308


Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarSusanne Moog <look@susi.dev>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarSusanne Moog <look@susi.dev>
parent 125d94c1
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