Actions
Bug #61229
closedMissing check in PreparedStatement
Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2014-08-27
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:
Description
If the prepared statement class is used for inserts or updates, the persistence class will trigger a fatal error, as there are no fields in the result set.
A simple fix is needed in the execute method
@@ -363,8 +364,10 @@ class PreparedStatement { // Store the list of fields if ($this->statement instanceof \mysqli_stmt) { $result = $this->statement->result_metadata(); - $fields = $result->fetch_fields(); - $result->close(); + if ($result instanceof \mysqli_result) { + $fields = $result->fetch_fields(); + $result->close(); + } } else {
I will send a patch for TYPO3 6.2 to gerrit shortly
Updated by Gerrit Code Review about 10 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 http://review.typo3.org/32452
Updated by Gerrit Code Review about 10 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32457
Updated by Jacob Rasmussen about 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset eba2225521054ac85f3927215e6644d1d7c96435.
Actions