Skip to content

Debug exception classes fail to pass $previous to FatalErrorException #27483

Closed
@alreece45

Description

@alreece45

Symfony version(s) affected: 4.1.2 (appears to affect 4.1.0)

Description

Debug exceptions pass an invalid parameter when $previous is set. e.g:

Uncaught TypeError: Argument 6 passed to Symfony\Component\Debug\Exception\FatalErrorException::__construct() must be of the type integer or null, object given,

Classes that appear to be affected:

How to reproduce
Trigger an undefined method, class, or function with another exception.

Possible Solution

  1. Accept an object as the 6th parameter (BC issue?)
  2. Don't pass $previous to the FatalErrorException constructor (potentially use a setter?)

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