From 25671ad567a951899ea0c0aaf32d0942b816c070 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 24 Feb 2019 07:26:14 +0300 Subject: [PATCH] logger/sql: limit maximum context length on mysql because mysql --- classes/logger/sql.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classes/logger/sql.php b/classes/logger/sql.php index 73552c143..a2f4cd32c 100755 --- a/classes/logger/sql.php +++ b/classes/logger/sql.php @@ -12,6 +12,9 @@ class Logger_SQL { $owner_uid = $_SESSION["uid"] ? $_SESSION["uid"] : null; + if (DB_TYPE == "mysql") + $context = substr($context, 0, 65534); + $sth = $this->pdo->prepare("INSERT INTO ttrss_error_log (errno, errstr, filename, lineno, context, owner_uid, created_at) VALUES (?, ?, ?, ?, ?, ?, NOW())");