Index: branches/5.2.x/core/kernel/db/db_connection.php =================================================================== diff -u -N -r14092 -r14095 --- branches/5.2.x/core/kernel/db/db_connection.php (.../db_connection.php) (revision 14092) +++ branches/5.2.x/core/kernel/db/db_connection.php (.../db_connection.php) (revision 14095) @@ -1,6 +1,6 @@ getMetaFunction('error'); $this->errorMessage = $this->connectionID ? $func($this->connectionID) : $func(); $error_msg = 'Database connection failed, please check your connection settings.
Error (' . $this->errorCode . '): ' . $this->errorMessage; - - trigger_error($error_msg, defined('IS_INSTALL') && IS_INSTALL ? E_USER_WARNING : E_USER_ERROR); + + if ( defined('IS_INSTALL') && IS_INSTALL ) { + trigger_error($error_msg, E_USER_WARNING); + } + else { + throw new Exception($error_msg); + } } function ReConnect($host, $user, $pass, $db, $force_new = false) @@ -432,7 +437,7 @@ // set 1st checkpoint: begin if ($this->_captureStatistics) { - $start_time = getmicrotime(); + $start_time = microtime(true); } // set 1st checkpoint: end @@ -453,7 +458,7 @@ // set 2nd checkpoint: begin if ($this->_captureStatistics) { - $query_time = getmicrotime() - $start_time; + $query_time = microtime(true) - $start_time; if ($query_time > DBG_MAX_SQL_TIME && !$no_debug) { $this->Application->logSlowQuery($sql, $query_time); } @@ -467,7 +472,7 @@ else { // set 2nd checkpoint: begin if ($this->_captureStatistics) { - $this->_queryTime += getmicrotime() - $start_time; + $this->_queryTime += microtime(true) - $start_time; } // set 2nd checkpoint: end }