Exceptions
Exception
Symfony\Component\HttpKernel\Exception\ ControllerDoesNotReturnResponseException
/**
* @Route("/pdf/{type}/{id}", methods={"GET"}, name="admin_vistoria_pdf")
*/
public function pdf($type, $id){
return $this->generate_pdf($type,$id,$_GET['com_fotos']);
}
protected function send_mail($cliente, $type, $pdf_path)
{
$message = '<style>
@import url(\'https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap\');
$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) {
Stack Trace
ControllerDoesNotReturnResponseException |
---|
Symfony\Component\HttpKernel\Exception\ControllerDoesNotReturnResponseException: The controller must return a "Symfony\Component\HttpFoundation\Response" object but it returned null. Did you forget to add a return statement somewhere in your controller? at src/Controller/Admin/VistoriaController.php:361 at 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:26) |