//Obtenemos el repositorio
$repositorio = $this->doctrine->getRepository(Etapas::class);
//Obtenemos informaciĆ³n de la etapa
$etapa = $repositorio->GetInfoEtapa($slug, $secuencia);
$poblaciones = $repositorio->GetAlberguesEtapa($etapa->getId());
$em = $this->doctrine->getManager();
$connection = $em->getConnection();
//$statement = $connection->prepare("SELECT folder, thumb FROM zenphoto_albums WHERE folder in ('albergue_de_peregrinos_de_deba')");
$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, $event);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Throwable $e) {
if ($e instanceof \Error && !$this->handleAllThrowables) {
throw $e;
}
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
Request::setTrustedHosts([$trustedHosts]);
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
No log messages
Error
|
---|
Error: Call to a member function getId() on null at src/Controller/EtapasController.php:37 at App\Controller\EtapasController->show() (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:74) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:184) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:25) |