Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class FatalThrowableError not found #896

Open
TetsuyaXD opened this issue Apr 13, 2023 · 0 comments
Open

Class FatalThrowableError not found #896

TetsuyaXD opened this issue Apr 13, 2023 · 0 comments

Comments

@TetsuyaXD
Copy link

  • Themosis Version: 3.1.0
  • WordPress Version: 6.1.1
  • PHP Version: 8.1.16

Description

Class "Symfony\Component\Debug\Exception\FatalThrowableError" not found (...) at .../vendor/themosis/framework/src/Core/helpers.php:829

if (! function_exists('report')) {
    /**
     * Report an exception.
     *
     * @param \Exception $exception
     */
    function report($exception)
    {
        if ($exception instanceof Throwable &&
            ! $exception instanceof Exception) {
            $exception = new FatalThrowableError($exception);
        }
        app(ExceptionHandler::class)->report($exception);
    }
}

Steps to reproduce

Call the report function passing a Throwable (no Exception), f.e. report(new Error());

Tested on a clean install, couldn't find the symfony/debug package in the dependency tree either

Expected behavior

Throwable being wrapped using the FatalThrowableError class thus handling the corresponding exception instead of throwing a new one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant