Project

General

Profile

Bug #21557 » 0012598.patch

Administrator Admin, 2009-11-15 17:57

View differences:

t3lib/class.t3lib_db.php (Arbeitskopie)
$error = $this->sql_error();
if ($error) {
debug(
array(
'caller' => 't3lib_DB::' . $func,
'ERROR' => $error,
'lastBuiltQuery' => ($query ? $query : $this->debug_lastBuiltQuery),
'debug_backtrace' => t3lib_div::debug_trail(),
),
'SQL debug'
);
// Backend: Use flash messages to visualize the information
if (TYPO3_MODE === 'BE') {
$message = t3lib_div::view_array(
array(
'caller' => 't3lib_DB::' . $func,
'lastBuiltQuery' => ($query ? $query : $this->debug_lastBuiltQuery),
'debug_backtrace' => t3lib_div::debug_trail(),
)
);
$flashMessage = t3lib_div::makeInstance(
't3lib_FlashMessage',
$message,
'TYPO3 Database Error: ' . $error,
t3lib_FlashMessage::ERROR
);
t3lib_FlashMessageQueue::addMessage($flashMessage);
// Frontend: Output directly
} else {
debug(
array(
'caller' => 't3lib_DB::' . $func,
'ERROR' => $error,
'lastBuiltQuery' => ($query ? $query : $this->debug_lastBuiltQuery),
'debug_backtrace' => t3lib_div::debug_trail(),
),
'SQL debug'
);
}
}
}
(1-1/3)