Skip to content

Logs in issue report #82

@asylume

Description

@asylume

There is minor issue with formatting logs preview: if PID is not included, html table cell (<td>) is not created, so main log message falls to PID column.

To fix this I replaced this part in includes/report.class.php line 184:

foreach ($cols as $idx=>$value) {
  switch ($idx) {
    case 0 : // TAG
        $html .= '<td>'.$value.'</td>';
      break;
    case 1 : // PID
        $html.= '<td>'.$value.'</td>';
      break;
  }
}

with:

$cols_count = count($cols);
if ($cols_count == 0) {
  // append empty cells
  $html .= '<td></td><td></td>';
}
else if ($cols_count == 1) {
  $html .= '<td>'.$cols[0].'</td>';
  // append empty cell, no pid
  $html .= '<td></td>';
}
else {
  $html .= '<td>'.$cols[0].'</td>';
  $html .= '<td>'.$cols[1].'</td>';
}

This ensures that rows have static number of columns (at least for tag/pid pair, I didn't check other possibilities).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions