Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[ErrorRenderer] Cannot use object of type ErrorException as array #33631

Closed
@k0d3r1s

Description

@k0d3r1s

Symfony version(s) affected: 4.4.x-dev 8853c2c

Description
On any exception another exception is thrown about using ErrorException as array

How to reproduce
throw any exception

Possible Solution

if (($exception = $log['context']['exception'] ?? null) && $exception instanceof ErrorException) {
    $severity = $log['context']['exception']->getSeverity();
} else {
    $severity = $log['context']['exception']['severity'] ?? false;
}

Additional context
Screenshot at 2019-09-18 19-46-43

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions