public function getAllPanoramas(): array
{
return $this->panoramaRepository->findBy(['active' => 1], ['id' => 'ASC']);
}
public function getPanorama(int $panoramaId): ?Panorama
{
return $this->panoramaRepository->find($panoramaId);
}
public function getNorthSouthEastWest(Panorama $panorama, string $format = 'deg'): array
Request $request,
UrlService $urlService
): Response {
$panoramaLink = $request->server->get('REQUEST_URI');
$panoramaId = $urlService->getPanoramaByLink($panoramaLink);
$panorama = $panoramaProvider->getPanorama($panoramaId);
if (!$panorama) {
return $this->redirect('/');
}
$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);
$response = null;
try {
return $response = $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;
}
}
) {
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
if (Kernel::VERSION_ID >= 60400) {
$response->send(false);
if (\function_exists('fastcgi_finish_request') && !$this->debug) {
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
<?php
use App\Kernel;
require_once dirname(__DIR__) . '/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool)$context['APP_DEBUG']);
};
No log messages
TypeError
|
---|
TypeError: App\Provider\PanoramaProvider::getPanorama(): Argument #1 ($panoramaId) must be of type int, null given, called in /data/2/1/21057120-45fe-4506-b70c-ed2402a2c1ae/virtualtravel.sk/web/src/Controller/MainController.php on line 77 at src/Provider/PanoramaProvider.php:31 at App\Provider\PanoramaProvider->getPanorama(null) (src/Controller/MainController.php:77) at App\Controller\MainController->getPanoramaPage(object(PanoramaProvider), object(PanoramaProviderDecorator), object(Request), object(UrlService)) (vendor/symfony/http-kernel/HttpKernel.php:181) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:76) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:197) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:29) at require_once('/data/2/1/21057120-45fe-4506-b70c-ed2402a2c1ae/virtualtravel.sk/web/vendor/autoload_runtime.php') (public/index.php:5) |