silverstripe / silverstripe-raygun

Raygun.com integration for PHP
BSD 3-Clause "New" or "Revised" License
6 stars 23 forks source link

v4: TypeError: RaygunHandler::writeError(): Argument #1 ($record) must be of type Monolog\LogRecord, array given #71

Closed chrispenny closed 1 year ago

chrispenny commented 1 year ago
if ($exception instanceof Throwable) {
    $this->writeException(
        $record,
        $formatted['tags'],
        $formatted['custom_data'],
        $formatted['timestamp']
    );
} elseif (isset($context['file']) && isset($context['line'])) {
    $this->writeError(
        $formatted,
        $formatted['tags'],
        $formatted['custom_data'],
        $formatted['timestamp']
    );
}

The section calling writeError() with $formatted (I think) needs to be updated to pass $record instead.