Skip to content
Snippets Groups Projects
Commit 356ca50b authored by Jared Hancock's avatar Jared Hancock
Browse files

oops: Fix gross error truncating thread messages

parent a14440ee
No related branches found
No related tags found
No related merge requests found
......@@ -1284,7 +1284,7 @@ class ThreadBody /* extends SplString */ {
if (strlen($this->body) > 250000) {
$max_packet = db_get_variable('max_allowed_packet', 'global');
// Truncate just short of the max_allowed_packet
$this->body = substr($this->body, $max_packet - 2048) . ' ... (truncated)';
$this->body = substr($this->body, 0, $max_packet - 2048) . ' ... (truncated)';
}
$this->type = $type;
$this->options = array_merge($this->options, $options);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment