Bug #24951
closedDebugging database errors breaks with this (formerly correct) code: $GLOBALS['TYPO3_DB']->debugOutput = true;
0%
Description
In class t3lib_DB on line ~ 134 it says
var $debugOutput = FALSE; // Set "TRUE" if you want database errors outputted.
But this is not correct any more. Setting $debugOutput to true results in displaying sql error debugging messages when there is no error.
On line ~ 1435 (funtion debug) it says:
if ($error || $this->debugOutput 2) {
This always evaluates to true, since (true 2) is always true. So there is a debug output even when there is no error.
I suggest type-casting $this->debugOutput to integer before comparing it to the number "2". And, of course, correct the comment on line ~ 134
Workaround for developers:
$GLOBALS['TYPO3_DB']->debugOutput = 1;
(issue imported from #M17478)
Files
Updated by Ernesto Baschny almost 14 years ago
Thanks for the report. Sounds reasonable.
Could you please provide a patch fixing that issue and submit it to the core list for review? Thanks a lot for your help!
Updated by Ernesto Baschny almost 14 years ago
Committed Helmuts v2 to:
- trunk rev 10403
- 4-5 rev 10404 (for 4.5.1)