Bug #77755
closeddebug_check_recordset returns true on $res === NULL
100%
Description
Hello there,
I lately experienced an issue that led me to this gem in the current TYPO3 6.2 core version.
public function debug_check_recordset($res) { if ($res !== FALSE) { return TRUE; } ... }
So this is quite the wrong thing to do in my opinion, since the $res
might as well be null and would still be validated which leads to an issue here:
public function sql_fetch_assoc($res) { if ($this->debug_check_recordset($res)) { $result = $res->fetch_assoc(); // right here if ($result === NULL) { // Needed for compatibility $result = FALSE; } ....I figured that there would be two ways of fixing this:
- Fix it in place in debug_check_recordset to also return false if $res is null
- Fix it in sql_fetch_assoc
I'm not sure if this is still in the current core branches but I'd like to have if fixed in the coding night, so this might just be a reminder ticket.
Regards
Tizian
Updated by Wouter Wolters about 8 years ago
- Status changed from New to Accepted
Agreed. Please contact Morton on coding night.
Updated by Wouter Wolters about 8 years ago
- Target version changed from next-patchlevel to 8.4
- Sprint Focus set to On Location Sprint
Updated by Gerrit Code Review about 8 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 https://review.typo3.org/49784
Updated by Gerrit Code Review about 8 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/49784
Updated by Gerrit Code Review about 8 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/49784
Updated by Gerrit Code Review about 8 years 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/49784
Updated by Gerrit Code Review about 8 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49784
Updated by Gerrit Code Review about 8 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49801
Updated by Tomita Militaru about 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 4423ab5b0e5d3cca3515c2b3d0ad227e03b9b25b.
Updated by Gerrit Code Review about 8 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49802
Updated by Tomita Militaru about 8 years ago
- Status changed from Under Review to Resolved
Applied in changeset 290015b4ea2a37f76a9296505c4394712ada168d.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed