$user=$this->container->get('security.token_storage')->getToken()->getUser();
$locale = $request->getLocale();
$menuRecambios = $this->getDoctrine()->getRepository(Articulo::class)->getMenu('R', $locale);
$menuAccesorios = $this->getDoctrine()->getRepository(Articulo::class)->getMenu('A', $locale);
$articulo = $this->getDoctrine()->getRepository(Articulo::class)->findOneBy(array('codigo' => $request->get('cod_art')));
$carpeta=$this->getDoctrine()->getRepository(Articulo::class)->getCarpeta($articulo->getFamilia());
if($carpeta != ''){
$listado_ficheros=$this->getDoctrine()->getRepository(Articulo::class)->getFiles($carpeta);
}else{
$listado_ficheros = array();
}
$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, int $type = HttpKernelInterface::MASTER_REQUEST, bool $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) {
No log messages
Error |
---|
Error: Call to a member function getFamilia() on null at src/Controller/ProductosController.php:152 at App\Controller\ProductosController->detalle(object(Request)) (vendor/symfony/http-kernel/HttpKernel.php:157) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:79) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:195) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:20) |