Project

General

Profile

Actions

Bug #19306

closed

Return value of debug_check_recordset is not used

Added by Stefan Precht over 15 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2008-09-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Within class.t3lib_db.php the method debug_check_recordset is used sometimes to check if a variable is a valid mysql resultset. This is done to avoid php warning messages.

Unfortunately the return value of this metod is not used...

The Method should be the statement of an if condition to use the return value of the validation.

If your TYPO3 installation is configured to display PHP Warnings, you get a lot message because of this failed validation.

My test system where I encounter this problem:
- TYPO3 Version 4.2.1
- Apache 2.0.59
- PHP 5.2.5
- MySQL 4.1.21

The file attached is from an TYPO3 Version as described above with this Issue fixed.
(issue imported from #M9316)


Files

class.t3lib_db.rar (10.9 KB) class.t3lib_db.rar Administrator Admin, 2008-09-09 12:13
class.ux_t3lib_db.php (6.66 KB) class.ux_t3lib_db.php Administrator Admin, 2009-08-31 15:00

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #18966: PHP Warning, if a sql error occurs - Bug in class t3lib_db function sql_fetch_assocClosedRupert Germann2008-06-16

Actions
Actions #1

Updated by Michiel Roos almost 15 years ago

The function debug_check_recordset should only be called if debugging is enabled.

Actions #2

Updated by Martin Holtz over 14 years ago

seems to be related to #18966

Actions #3

Updated by Andrea De over 14 years ago

i've uploaded an xclass to solve the bug (i've used code from previous attachment)
If you want to use it, put it in the typo3conf folder and add this to localconf.php:
$TYPO3_CONF_VARS["FE"]["XCLASS"]["t3lib/class.t3lib_db.php"]=PATH_typo3conf."class.ux_t3lib_db.php";

I hope this is helpful for someone

P.S. this should fix 0008728 also

Actions #4

Updated by Chris topher almost 14 years ago

Resolved with #18966.

Actions #5

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF