Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
9b6059c4
Commit
9b6059c4
authored
9 years ago
by
Luxian
Committed by
Chris Leppanen
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
views/feeds_views_handler_field_log_message.inc
+11
-4
11 additions, 4 deletions
views/feeds_views_handler_field_log_message.inc
with
11 additions
and
4 deletions
views/feeds_views_handler_field_log_message.inc
+
11
−
4
View file @
9b6059c4
...
@@ -2,24 +2,31 @@
...
@@ -2,24 +2,31 @@
/**
/**
* @file
* @file
*
V
iews
handler
for displaying a
log
message.
*
Contains feeds_v
iews
_
handler
_field_
log
_
message.
*/
*/
/**
* Views handler for displaying a log message.
*/
class
feeds_views_handler_field_log_message
extends
views_handler_field
{
class
feeds_views_handler_field_log_message
extends
views_handler_field
{
/**
/**
* Override parent::render().
* Override parent::render().
*/
*/
function
render
(
$values
)
{
public
function
render
(
$values
)
{
$message
=
$values
->
{
$this
->
field_alias
};
$message
=
$values
->
{
$this
->
field_alias
};
$variables
=
unserialize
(
$values
->
{
$this
->
aliases
[
'variables'
]});
$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.
* Disallow advanced rendering.
*/
*/
function
allow_advanced_render
()
{
public
function
allow_advanced_render
()
{
return
FALSE
;
return
FALSE
;
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment