]> git.wh0rd.org - tt-rss.git/blobdiff - classes/logger/sql.php
store formatted backtrace to sql log
[tt-rss.git] / classes / logger / sql.php
index 888ef67ddf03c8c63aa7b076b3d618cc87c5bd40..96263a97e7f97245f1835845d1d17fa6464e637c 100644 (file)
@@ -2,17 +2,13 @@
 class Logger_SQL {
 
        function log_error($errno, $errstr, $file, $line, $context) {
-
-               if ($errno == E_NOTICE) return false;
-
-               if (Db::get()) {
+               if (Db::get() && get_schema_version() > 117) {
 
                        $errno = Db::get()->escape_string($errno);
                        $errstr = Db::get()->escape_string($errstr);
                        $file = Db::get()->escape_string($file);
                        $line = Db::get()->escape_string($line);
-                       $context = ''; // backtrace is a lot of data which is not really critical to store
-                       //$context = db_escape_string(serialize($context));
+                       $context = DB::get()->escape_string($context);
 
                        $owner_uid = $_SESSION["uid"] ? $_SESSION["uid"] : "NULL";