Bug #87387

Return type of TYPO3\CMS\Core\Http\NormalizedParams::determineSiteScript is wrong in some cases

Added by Harald Atteneder 6 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-01-10
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

Should always return a string. But substr returns a boolean when $start is greater or equal to the length of the string itself.

Therefore TYPO3\CMS\Core\Http\NormalizedParams::determineSiteScript throws the following error:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: Return value of TYPO3\CMS\Core\Http\NormalizedParams::determineSiteScript() must be of the type string, boolean returned | TypeError thrown in file /html/public/typo3/sysext/core/Classes/Http/NormalizedParams.php in line 809. Requested URL: http://domain.tld/

Associated revisions

Revision e0646bd4 (diff)
Added by Harald Atteneder 5 months ago

[BUGFIX] Fix return type of determineSiteScript

substr returns a boolean instead of an empty string. A typecast fixes
this problem (See http://php.net/manual/de/function.substr.php#90369)

Resolves: #87387
Releases: master, 9.5
Change-Id: I14aa49c18ae028dc27b94bfdbfc3dfb643c18746
Reviewed-on: https://review.typo3.org/59395
Tested-by: TYPO3com <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>
Reviewed-by: Alexander Schnitzler <>
Tested-by: Alexander Schnitzler <>
Reviewed-by: Oliver Klee <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

Revision b689a8dc (diff)
Added by Harald Atteneder 5 months ago

[BUGFIX] Fix return type of determineSiteScript

substr returns a boolean instead of an empty string. A typecast fixes
this problem (See http://php.net/manual/de/function.substr.php#90369)

Resolves: #87387
Releases: master, 9.5
Change-Id: I14aa49c18ae028dc27b94bfdbfc3dfb643c18746
Reviewed-on: https://review.typo3.org/59612
Tested-by: TYPO3com <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

History

#1 Updated by Gerrit Code Review 6 months 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/59395

#2 Updated by Gerrit Code Review 6 months 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/59395

#3 Updated by Gerrit Code Review 6 months 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/59395

#4 Updated by Gerrit Code Review 5 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59395

#5 Updated by Gerrit Code Review 5 months 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/59612

#6 Updated by Harald Atteneder 5 months ago

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

#7 Updated by Benni Mack about 2 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF