Don't do false SQL query when SYS[setDBinit] is empty. Log error on failure
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Thu, 20 Apr 2006 09:00:43 +0000 (09:00 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Thu, 20 Apr 2006 09:00:43 +0000 (09:00 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1443 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_db.php

index 620b95b..6292db1 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-04-20  Martin Kutschker  <martin.t.kutschker@blackbox.net>
+
+       * Don't do false SQL query when SYS[setDBinit] is empty. Log error on failure.
+
 2006-04-19  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
        * Added "Lucida Console" (Windows core font) as default font for monospaced BE form fields
index ed80914..5642688 100755 (executable)
@@ -894,10 +894,10 @@ class t3lib_DB {
                if (!$this->link) {
                        t3lib_div::sysLog('Could not connect to Mysql server '.$TYPO3_db_host.' with user '.$TYPO3_db_username.'.','Core',4);
                } else {
-                       $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);
                        foreach ($setDBinit as $v)      {
                                if (mysql_query($v, $this->link) === FALSE)     {
-                                       t3lib_div::sysLog('Could not initialize DB connection with query "'.$v.'".','Core',3);
+                                       t3lib_div::sysLog('Could not initialize DB connection with query "'.$v.'": '.mysql_error($this->link),'Core',3);
                                }
                        }
                }