From 4c239b57db7de257db836fc4ee3c8376bc0dd0d8 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Thu, 2 Oct 2014 19:37:18 +0200 Subject: [PATCH] Fixed an error with the event comments --- pandora_console/operation/events/events.build_table.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_console/operation/events/events.build_table.php b/pandora_console/operation/events/events.build_table.php index ad35bf6ae2..919de31239 100644 --- a/pandora_console/operation/events/events.build_table.php +++ b/pandora_console/operation/events/events.build_table.php @@ -436,8 +436,11 @@ foreach ($result as $event) { if (in_array('user_comment',$show_fields)) { $safe_event_user_comment = strip_tags(io_safe_output($event["user_comment"])); + $line_breaks = array("\r\n", "\n", "\r"); + $safe_event_user_comment = str_replace($line_breaks, '
', $safe_event_user_comment); $event_user_comments = json_decode($safe_event_user_comment, true); $event_user_comment_str = ""; + if (!empty($event_user_comments)) { $last_key = key(array_slice($event_user_comments, -1, 1, true)); $date_format = $config['date_format'];