$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
Level | Channel | Message |
---|---|---|
CRITICAL 10:09:07 | php |
Uncaught Error: Call to a member function getId() on null { "exception": {} } |
CRITICAL 10:09:07 | request |
Uncaught PHP Exception Error: "Call to a member function getId() on null" at /var/www/html/leadgen/v1/src/Controller/ApiController.php line 4526 { "exception": {} } |
Error |
---|
Error: Call to a member function getId() on null at src/Controller/ApiController.php:4526 at App\Controller\ApiController->content(object(Request)) (vendor/symfony/http-kernel/HttpKernel.php:158) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:80) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:201) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:25) |