[TYPO3-core] RFC: empty SYS[setDBinit] floods error log
Dmitry Dulepov
dima at spamcop.net
Tue Apr 18 21:52:33 CEST 2006
Hi!
Martin Kutschker wrote:
> + if ($v !== '') {
> + if (mysql_query($v, $this->link) === FALSE) {
> + t3lib_div::sysLog('Could not initialize DB connection with query "'.$v.'".','Core',3);
> + }
What about this:
if ($v !== '' && mysql_query(....) === false) {
...
}
It uses short-circuited boolean evaluation and a bit more compact.
But +1 for your original code too.
Dmitry.
More information about the TYPO3-team-core
mailing list