Project

General

Profile

Actions

Bug #77755

closed

debug_check_recordset returns true on $res === NULL

Added by Tizian Schmidlin about 8 years ago. Updated about 7 years ago.

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

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
On Location Sprint

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:
  1. Fix it in place in debug_check_recordset to also return false if $res is null
  2. 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


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #77671: ExtensionManager error on update repository listClosed2016-08-29

Actions
Actions #1

Updated by Wouter Wolters about 8 years ago

  • Status changed from New to Accepted

Agreed. Please contact Morton on coding night.

Actions #2

Updated by Wouter Wolters about 8 years ago

  • Target version changed from next-patchlevel to 8.4
  • Sprint Focus set to On Location Sprint
Actions #3

Updated by Tomita Militaru about 8 years ago

I am working on this one.

Actions #4

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

Actions #5

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

Actions #6

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

Actions #7

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

Actions #8

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

Actions #9

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

Actions #10

Updated by Tomita Militaru about 8 years ago

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

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

Actions #12

Updated by Tomita Militaru about 8 years ago

  • Status changed from Under Review to Resolved
Actions #13

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF