Bug #81613

Wrong parameter type in quote function

Added by Henrik Elsner over 2 years ago. Updated 12 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-06-19
Due date:
% Done:

100%

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

Description

It seems like there is the wrong type for the type-parameter expected in the quote function (Core\Database\Query\Querybuilder).

public function quote($input, string $type = null)

$type in doctrine is actually set as \PDO::PARAM which is an Integer value.

function quote($input, $type=\PDO::PARAM_STR);

This means the type parameter can't be used

Associated revisions

Revision 13d30c42 (diff)
Added by Henrik Elsner over 2 years ago

[BUGFIX] Fix wrong parameter type

The quoting parameter constants \PDO::PARAM_* are in fact integers. The
annotation shipped with doctrine says string, and the strict type
processing in core leads to a wrong parameter error.
Changing the strict type to int, as would be correct, solves the problem.

Releases: master, 8.7
Resolves: #81613
Change-Id: Ic327b2d761b74868cc46d781acab1f4fd9e6cfdb
Reviewed-on: https://review.typo3.org/53260
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>
Tested-by: TYPO3com <>

Revision 5ec48ab3 (diff)
Added by Henrik Elsner over 2 years ago

[BUGFIX] Fix wrong parameter type

The quoting parameter constants \PDO::PARAM_* are in fact integers. The
annotation shipped with doctrine says string, and the strict type
processing in core leads to a wrong parameter error.
Changing the strict type to int, as would be correct, solves the problem.

Releases: master, 8.7
Resolves: #81613
Change-Id: Ic327b2d761b74868cc46d781acab1f4fd9e6cfdb
Reviewed-on: https://review.typo3.org/53261
Tested-by: TYPO3com <>
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>

History

#1 Updated by Gerrit Code Review over 2 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/53260

#2 Updated by Gerrit Code Review over 2 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/53260

#3 Updated by Gerrit Code Review over 2 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53261

#4 Updated by Henrik Elsner over 2 years ago

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

#5 Updated by Benni Mack 12 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF