]>
git.wh0rd.org - tt-rss.git/blob - classes/logger/sql.php
6 function log_error($errno, $errstr, $file, $line, $context) {
8 // separate PDO connection object is used for logging
9 if (!$this->pdo
) $this->pdo
= Db
::instance()->pdo_connect();
11 if ($this->pdo
&& get_schema_version() > 117) {
13 $owner_uid = $_SESSION["uid"] ?
$_SESSION["uid"] : null;
15 $sth = $this->pdo
->prepare("INSERT INTO ttrss_error_log
16 (errno, errstr, filename, lineno, context, owner_uid, created_at) VALUES
17 (?, ?, ?, ?, ?, ?, NOW())");
18 $sth->execute([$errno, $errstr, $file, $line, $context, $owner_uid]);
20 return $sth->rowCount();