Project

General

Profile

Actions

Bug #91894

closed

Cast transOrigPointerField value to integer to ensure return type matches

Added by Daniel Siepmann over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Start date:
2020-07-30
Due date:
% Done:

100%

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

Description

When using sqlite, data fetched from DB is not of expected data types.
Therefore some return type hints will break.

In order to not break resolvePreviewRecordId(), there has to be a cast.

This prevents users from editing translated records.

Actions #1

Updated by Gerrit Code Review over 4 years ago

  • Status changed from New to Under Review

Patch set 1 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/+/65139

Actions #2

Updated by Gerrit Code Review over 4 years ago

Patch set 2 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/+/65139

Actions #3

Updated by Daniel Siepmann over 4 years ago

  • Description updated (diff)
Actions #4

Updated by Anja Leichsenring over 4 years ago

how did you find out? Some steps to reproduce the issue would be helpful in testing the change (and yes I realize it is minor). We might run into this root case elsewhere, too.

Actions #5

Updated by Daniel Siepmann over 4 years ago

Sure, sorry.

Translate a record (e.g. tt_content or sys_category).
Use sqlite as DBMS.
Open the edit form of the translated record.

This should result in an error: `Return value of TYPO3\CMS\Backend\Controller\EditDocumentController::resolvePreviewRecordId() must be of the type int, string returned`.

I'm running my website on sqlite for this reason. But only use translations for a specific test right now.
The multiple possible locations are one reason I'm using sqlite. That way I'll find those bugs and can fix them.

Actions #6

Updated by Gerrit Code Review over 4 years ago

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/+/65139

Actions #7

Updated by Gerrit Code Review over 4 years ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65111

Actions #8

Updated by Gerrit Code Review over 4 years ago

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/+/65152

Actions #9

Updated by Daniel Siepmann over 4 years ago

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

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF