Bug #89692

Followup #89008, PHP type errors and stale workspace page language cache

Added by Claus Due 2 months ago. Updated 4 days ago.

Status:
Under Review
Priority:
Must have
Assignee:
-
Category:
Workspaces
Target version:
Start date:
2019-08-26
Due date:
2019-08-26
% Done:

100%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

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


Related issues

Follows TYPO3 Core - Task #89008: Migrate TYPO3/CMS/Workspace/* to TypeScript Closed 2019-08-23

Associated revisions

Revision 034baf30 (diff)
Added by Claus Due 2 months ago

[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: Andreas Fernandez <>
Tested-by: TYPO3com <>
Tested-by: Susanne Moog <>
Reviewed-by: Andreas Fernandez <>
Reviewed-by: Susanne Moog <>

History

#1 Updated by Claus Due 2 months ago

  • Due date set to 2019-08-26
  • Start date changed from 2019-11-15 to 2019-08-26
  • Follows Task #89008: Migrate TYPO3/CMS/Workspace/* to TypeScript added

#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

#3 Updated by Anonymous 2 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#4 Updated by Benni Mack about 1 month ago

  • Status changed from Resolved to Closed

#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

Also available in: Atom PDF