[TYPO3-core] RFC: minor optimisation of getRecordRaw()
Martin Kutschker
martin.kutschker-n0spam at no5pam-blackbox.net
Sun Dec 3 12:53:06 CET 2006
Dmitry Dulepov schrieb:
> Hi!
>
> Martin Kutschker wrote:
>> Maybe you could use both. Into devLog log everything, into sysLog log
>> only the immediate caller of t3lib_db-code (instead of the complete
>> backtrace).
>
> Hm, good idea. Added & commited to trunk.
That was not quite what I meant. Plus you added a PHP check which is not
necessary any more. I think that we agreed on PHP 4.3 for TYPO3 for 4.1.
function debug_check_recordset($res) {
if (!$res) {
$trace = debug_backtrace();
array_shift($trace);
t3lib_div::sysLog('Invalid database result resource detected. ' .
function t3lib_DB->'.$trace[0]['function'].' called from file ' .
substr($trace[1]['file'],strlen(PATH_site)) .
', line ' . $trace[1]['line'], 'Core', 3);
t3lib_div::devLog('Invalid recordset detected',
'Core/t3lib_db', 3, $trace);
return false;
}
return true;
}
So you have at least a minimal info of what happend.
Not also that there is no "devLog" extension. There is cc_devlog and
rlmp_filedevlog. At least the former does not make use of the "extra"
information of the log entry!
Masi
PS: I was a bit slow to respond, but at lest in Mysql nomenclatura this
is not a recordset but a result resource!
More information about the TYPO3-team-core
mailing list