Fixed an error with the event comments

This commit is contained in:
Alejandro Gallardo Escobar 2014-10-02 19:37:18 +02:00
parent 5edfc1afa5
commit f323ac9bfe
1 changed files with 3 additions and 0 deletions

View File

@ -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, '<br>', $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'];