Exceptions
Exception
TypeError
/*** Returns a RedirectResponse to the given URL.** @param int $status The HTTP status code (302 "Found" by default)*/protected function redirect(string $url, int $status = 302): RedirectResponse{return new RedirectResponse($url, $status);}/**
$this->addFlash('success','Product add succefully to cart');return $this->redirect($request->headers->get('referer'));}#[Route('/cart/decrease/{id}', name: 'app_cart_decrease')]public function decrease($id, Cart $cart): Response{
in
vendor/symfony/http-kernel/HttpKernel.php
->
add
(line 190)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);$controller = $event->getController();$arguments = $event->getArguments();// call controller$response = $controller(...$arguments);// viewif (!$response instanceof Response) {$event = new ViewEvent($this, $request, $type, $response, $controllerMetadata);$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 79)
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);$response = null;try {return $response = $this->handleRaw($request, $type, $controllerMetadata);} catch (\Throwable $e) {if ($e instanceof \Error && !$this->handleAllThrowables) {throw $e;}
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 143)
if (!$this->handlingHttpCache) {$this->resetServices = true;}try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 34)
) {}public function run(): int{$response = $this->kernel->handle($this->request);$response->send(false);if (\function_exists('fastcgi_finish_request') && !$this->debug) {fastcgi_finish_request();
in
vendor/autoload_runtime.php
->
run
(line 32)
$app = $app(...$args);exit($runtime->getRunner($app)->run());
require_once('/var/www/dev_la_boutique_francaise/vendor/autoload_runtime.php')
in
public/index.php
(line 5)
<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Logs
| Level | Channel | Message |
|---|---|---|
| INFO 23:43:20 | request |
Matched route "_profiler". {
"route": "_profiler",
"route_parameters": {
"_route": "_profiler",
"_controller": "web_profiler.controller.profiler::panelAction",
"token": "92d238"
},
"request_uri": "https://dev.la-boutique-francaise.vicstoryhub.fr/_profiler/92d238",
"method": "GET"
}
|
| INFO 23:43:20 | doctrine |
Connecting with parameters {params} {
"params": {
"driver": "pdo_mysql",
"idle_connection_ttl": 600,
"host": "localhost",
"port": 3306,
"user": "dev_la_boutique_francaise",
"password": "<redacted>",
"driverOptions": [],
"defaultTableOptions": [],
"dbname": "db_dev_la_boutique_francaise",
"serverVersion": "10.11.6-MariaDB",
"charset": "utf8mb4"
}
}
|
| DEBUG 23:43:20 | doctrine |
Executing query: SELECT t0.id AS id_1, t0.name AS name_2, t0.slug AS slug_3 FROM category t0 {
"sql": "SELECT t0.id AS id_1, t0.name AS name_2, t0.slug AS slug_3 FROM category t0"
}
|
Stack Trace
|
TypeError
|
|---|
TypeError:
Symfony\Bundle\FrameworkBundle\Controller\AbstractController::redirect(): Argument #1 ($url) must be of type string, null given, called in /var/www/dev_la_boutique_francaise/src/Controller/CartController.php on line 43
at vendor/symfony/framework-bundle/Controller/AbstractController.php:132
at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->redirect()
(src/Controller/CartController.php:43)
at App\Controller\CartController->add()
(vendor/symfony/http-kernel/HttpKernel.php:190)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:79)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:143)
at Symfony\Component\HttpKernel\Kernel->handle()
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:34)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:32)
at require_once('/var/www/dev_la_boutique_francaise/vendor/autoload_runtime.php')
(public/index.php:5)
|