Bug #67204
closedCalling DatabaseConnection::exec_SELECTgetRows() with an invalid $uidIndexField returns only a single row
100%
Description
If one accidentally calls DatabaseConnection::exec_SELECTgetRows() with an invalid $uidIndexField, the method only returns a single record.
The reason is that the existence of the specified field is not verified. If the field is not set, the code
$output[$tempRow[$uidIndexField]] = $tempRow;
results in
$output[0] = $tempRow;
which simply overrides the first entry of the array. This happens for every record, hence finally only the last record of the query result is returned.
The method should check the $uidIndexField really exists and should throw an exception otherwise, in order to inform the developer of the mistake.
Updated by Gerrit Code Review over 9 years ago
- Status changed from Accepted 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 http://review.typo3.org/39807
Updated by Gerrit Code Review over 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39807
Updated by Gerrit Code Review over 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39807
Updated by Gerrit Code Review over 9 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39807
Updated by Gerrit Code Review over 9 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39807
Updated by Gerrit Code Review over 9 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39807
Updated by Markus Klein over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 7b0cd3533497c203fce88943852b34b6190cb43c.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed