Skip to content
Snippets Groups Projects
Commit c7466d9b authored by Randal Vanheede's avatar Randal Vanheede
Browse files

#3315047 - Fix FilesLogController not allowing for null values

parent 53a72634
No related branches found
No related tags found
No related merge requests found
......@@ -186,9 +186,10 @@ class FilesLogController extends ControllerBase {
$message .= '...';
}
$table['#rows'][] = [
$this->getLogLevelLabel($log['severity']),
$log['type'],
DrupalDateTime::createFromTimestamp($log['timestamp'])->format('Y-m-d H:i:s'),
(isset($log['severity']) && is_numeric($log['severity'])) ?
$this->getLogLevelLabel($log['severity']) : '',
$log['type'] ?? '',
DrupalDateTime::createFromTimestamp($log['timestamp'] ?? 0)->format('Y-m-d H:i:s'),
Markup::create('<a href="' . $url->toString() . '">' . $message . '</a>'),
Markup::create($user instanceof UserInterface && $user->id() != '0'
? '<a href="' . $user->toUrl()->toString() . '">' . $user->label() . '</a>'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment