Skip to content
Snippets Groups Projects
Commit 9b6059c4 authored by Luxian's avatar Luxian Committed by Chris Leppanen
Browse files

Issue #2364103 by Luxian, MegaChriz: Feeds error log crashes when log messages are too long

parent 78e65671
No related branches found
No related tags found
No related merge requests found
......@@ -2,24 +2,31 @@
/**
* @file
* Views handler for displaying a log message.
* Contains feeds_views_handler_field_log_message.
*/
/**
* Views handler for displaying a log message.
*/
class feeds_views_handler_field_log_message extends views_handler_field {
/**
* Override parent::render().
*/
function render($values) {
public function render($values) {
$message = $values->{$this->field_alias};
$variables = unserialize($values->{$this->aliases['variables']});
return t($message, $variables);
// Messages that are too long may generate a PDO exception when calling t()
// if Drupal tries to add them in {locales_source} table.
return t(truncate_utf8($message, 65000, TRUE, TRUE), $variables);
}
/**
* Disallow advanced rendering.
*/
function allow_advanced_render() {
public function allow_advanced_render() {
return FALSE;
}
}
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