Error 500 Internal Server Error

GET https://pruebas.penalara.com/en/announcements/37&amp

Forwarded to ErrorController (6aa771)

Exceptions

App\Controller\SeccionPublicaController::pag_noticiasdetalle(): Argument #1 ($idNoticia) must be of type int, string given, called in /var/www/pruebas.penalara.com/vendor/symfony/http-kernel/HttpKernel.php on line 183

Exception

TypeError

  1. 'sitemap' => [
  2. 'priority' => 0.85,
  3. 'changefreq' => UrlConcrete::CHANGEFREQ_WEEKLY]
  4. ]
  5. )]
  6. public function pag_noticiasdetalle(int $idNoticia, NoticiasRepository $noticiasRepository, TraduccionesNoticiasRepository $tradNoticiasRepository): Response {
  7. if($this->idioma == 'es') {
  8. $noticia = $noticiasRepository->findNoticia($idNoticia);
  9. } else {
  10. $noticia = $tradNoticiasRepository->findNoticia($this->idioma, $idNoticia);
in vendor/symfony/http-kernel/HttpKernel.php -> pag_noticiasdetalle (line 183)
  1. $this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
  2. $controller = $event->getController();
  3. $arguments = $event->getArguments();
  4. // call controller
  5. $response = $controller(...$arguments);
  6. // view
  7. if (!$response instanceof Response) {
  8. $event = new ViewEvent($this, $request, $type, $response, $event);
  9. $this->dispatcher->dispatch($event, KernelEvents::VIEW);
  1. $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2. $this->requestStack->push($request);
  3. $response = null;
  4. try {
  5. return $response = $this->handleRaw($request, $type);
  6. } catch (\Throwable $e) {
  7. if ($e instanceof \Error && !$this->handleAllThrowables) {
  8. throw $e;
  9. }
  1. if (!$this->handlingHttpCache) {
  2. $this->resetServices = true;
  3. }
  4. try {
  5. return $this->getHttpKernel()->handle($request, $type, $catch);
  6. } finally {
  7. --$this->requestStackSize;
  8. }
  9. }
  1. ) {
  2. }
  3. public function run(): int
  4. {
  5. $response = $this->kernel->handle($this->request);
  6. if (Kernel::VERSION_ID >= 60400) {
  7. $response->send(false);
  8. if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in vendor/autoload_runtime.php -> run (line 32)
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('/var/www/pruebas.penalara.com/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5. return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Logs

Level Channel Message
INFO 14:40:22 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "latest"
    },
    "request_uri": "https://pruebas.penalara.com/_profiler/latest?ip=98.82.40.168&type=request",
    "method": "GET"
}
INFO 14:40:22 deprecation Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated
{
    "exception": {}
}
INFO 14:40:22 doctrine Connecting with parameters {params}
{
    "params": {
        "use_savepoints": true,
        "driver": "pdo_mysql",
        "idle_connection_ttl": 600,
        "host": "127.0.0.1",
        "port": 3306,
        "user": "pruebalara",
        "password": "<redacted>",
        "driverOptions": [],
        "defaultTableOptions": {
            "collation": "utf8mb4_unicode_ci"
        },
        "dbname": "pruebasGHC",
        "serverVersion": "8.0.29",
        "charset": "utf8mb4"
    }
}

Stack Trace

TypeError
TypeError:
App\Controller\SeccionPublicaController::pag_noticiasdetalle(): Argument #1 ($idNoticia) must be of type int, string given, called in /var/www/pruebas.penalara.com/vendor/symfony/http-kernel/HttpKernel.php on line 183

  at src/Controller/SeccionPublicaController.php:823
  at App\Controller\SeccionPublicaController->pag_noticiasdetalle()
     (vendor/symfony/http-kernel/HttpKernel.php:183)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:76)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:193)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:32)
  at require_once('/var/www/pruebas.penalara.com/vendor/autoload_runtime.php')
     (public/index.php:5)