[TYPO3-core] RFC: empty SYS[setDBinit] floods error log

Karsten Dambekalns karsten at typo3.org
Wed Apr 19 10:14:32 CEST 2006


Hi.

On Tuesday 18 April 2006 19:03, Martin Kutschker wrote:
> Problem:
> t3lib_db->sql_pconnect tries to execute SQL-statement set in
> SYS[setDBinit]. For an empty string at least on empty SQL-command is
> "exetcuted". This is unnecessary and floods the error log.
>
> Solution:
> Test if the SQL-command is an empty string.

-1

This is better (pseudo-patch):

- $setDBinit = t3lib_div::trimExplode(chr(10), $GLOBALS['TYPO3_CONF_VARS']
['SYS']['setDBinit']);
+ $setDBinit = t3lib_div::trimExplode(chr(10), $GLOBALS['TYPO3_CONF_VARS']
['SYS']['setDBinit'], true);

Then trimExplode returns an empty array and the loop isn't entered at all.

Karsten
-- 
Karsten Dambekalns
TYPO3 Association - Active Member
http://association.typo3.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 309 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060419/29c99abe/attachment.pgp 


More information about the TYPO3-team-core mailing list