Index: branches/5.2.x/core/kernel/application.php =================================================================== diff -u -N -r16661 -r16662 --- branches/5.2.x/core/kernel/application.php (.../application.php) (revision 16661) +++ branches/5.2.x/core/kernel/application.php (.../application.php) (revision 16662) @@ -1,6 +1,6 @@ Conn->noDebuggingState = true; $script_time = microtime(true) - $start; $query_statistics = $this->Conn->getQueryStatistics(); // time & count @@ -1267,6 +1268,8 @@ $data['LastHit'] = adodb_mktime(); $this->Conn->doInsert($data, TABLE_PREFIX . 'StatisticsCapture'); } + + $this->Conn->noDebuggingState = false; } /** @@ -1301,12 +1304,13 @@ */ public function logSlowQuery($slow_sql, $time) { + $this->Conn->noDebuggingState = true; $query_crc = kUtil::crc32($slow_sql); $sql = 'SELECT * FROM ' . TABLE_PREFIX . 'SlowSqlCapture WHERE QueryCrc = ' . $query_crc; - $data = $this->Conn->Query($sql, null, true); + $data = $this->Conn->Query($sql); if ( $data ) { $data = array_shift($data); // Because "Query" method (supports $no_debug) is used instead of "GetRow". @@ -1332,6 +1336,8 @@ $this->Conn->doInsert($data, TABLE_PREFIX . 'SlowSqlCapture'); } + + $this->Conn->noDebuggingState = false; } /**