Checks for history in system logs

This commit is contained in:
David Bomba 2023-10-18 22:26:13 +11:00
parent 45d5838aa8
commit 546e827732

View File

@ -32,7 +32,7 @@ class EmailHistoryController extends BaseController
->orderBy('id', 'DESC')
->cursor()
->filter(function ($system_log) {
return ($system_log->log['history'] && isset($system_log->log['history']['events']) && count($system_log->log['history']['events']) >=1) !== false;
return (isset($system_log->log['history']) && isset($system_log->log['history']['events']) && count($system_log->log['history']['events']) >=1) !== false;
})->map(function ($system_log) {
return $system_log->log['history'];
})->values()->all();