8000 HttpKernel broken · Issue #47927 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

HttpKernel broken #47927

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

Closed
StaffNowa opened this issue Oct 20, 2022 · 5 comments
Closed

HttpKernel broken #47927

StaffNowa opened this issue Oct 20, 2022 · 5 comments

Comments

@StaffNowa
Copy link
Contributor
StaffNowa commented Oct 20, 2022

Symfony version(s) affected

4.4.45

Description

Before an issue, we had a good error message.
After an issue in every error, we have "Call to a member function getBaseUrl() on null"
If the comment finally parts, it again works.

public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
    {
        $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());

        $this->requestStack->push($request);
        try {
            return $this->handleRaw($request, $type);
        } catch (\Exception $e) {
            if ($e instanceof RequestExceptionInterface) {
                $e = new BadRequestHttpException($e->getMessage(), $e);
            }
            if (false === $catch) {
                $this->finishRequest($request, $type);

                throw $e;
            }

            return $this->handleThrowable($e, $request, $type);
//        } finally {
//            $this->requestStack->pop();
        }
    }

How to reproduce

  1. Open any existing project
  2. Autowire in method (entity property + any class which needed to have entity object but it will return null because not found record).
  3. With SF 4.4.45 we will get strange error "Call to a member function getBaseUrl() on null"
  4. composer.json add "symfony/http-kernel": "4.4.44"
  5. Run composer up (downgrade symfony/http-kernel" and works again.

Possible Solution

Finally section works not property.

Additional Context

No response

@nicolas-grekas
Copy link
Member

Already fixed by #47857 I'd say

@StaffNowa
Copy link
Contributor Author

How to get this into our 4.4.x version? Because it still broken

@nicolas-grekas
Copy link
Member

Next release should happen at the end of the month.

@derrabus
Copy link
Member
"require": {
    "symfony/http-kernel": "~4.4.48@dev"
}

@StaffNowa
Copy link
Contributor Author
StaffNowa commented Oct 20, 2022
"require": {
    "symfony/http-kernel": "~4.4.48@dev"
}

After this change, all is good now.

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

No branches or pull requests

4 participants
0