Actions
Bug #24951
closedDebugging database errors breaks with this (formerly correct) code: $GLOBALS['TYPO3_DB']->debugOutput = true;
Status:
Closed
Priority:
Should have
Assignee:
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2011-02-04
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:
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
Actions