Bug #19306
closedReturn value of debug_check_recordset is not used
0%
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
Updated by Michiel Roos over 15 years ago
The function debug_check_recordset should only be called if debugging is enabled.
Updated by Andrea De about 15 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