Exemplo n.º 1
0
 protected function learning_log_exception($message, $code, $line, $file, $backtrace)
 {
     if (!method_exists('CDatabase', 'Query')) {
         return;
     }
     global $DB;
     if (!(is_object($DB) && method_exists($DB, 'Query'))) {
         return;
     }
     if (!$DB->TableExists('b_learn_exceptions_log')) {
         return;
     }
     $DB->Query("INSERT INTO b_learn_exceptions_log\n\t\t\t\t\t(DATE_REGISTERED, CODE, MESSAGE, FFILE, LINE, BACKTRACE)\n\t\t\t\t\tVALUES (" . CDatabase::GetNowFunction() . ", " . (int) $code . ", '" . CDatabase::ForSQL($message) . "', '" . CDatabase::ForSQL($file) . "', " . (int) $line . ",'" . CDatabase::ForSQL(base64_encode(serialize($backtrace))) . "')\n\t\t\t\t\t", true);
 }
Exemplo n.º 2
0
 protected static function EscapeAndAddLateralQuotes($txt)
 {
     return "'" . CDatabase::ForSQL($txt) . "'";
 }