"data2ui/images/moon/1.svg"
"data2ui/images/moon/1.svg"
"data2ui/images/moon/2.svg"
"data2ui/images/moon/2.svg"
"data2ui/images/moon/2.svg"
"data2ui/images/moon/2.svg"
"data2ui/images/moon/3.svg"
"data2ui/images/moon/3.svg"
"data2ui/images/moon/3.svg"
"data2ui/images/moon/3.svg"
"data2ui/images/moon/4.svg"
"data2ui/images/moon/4.svg"
"data2ui/images/moon/4.svg"
"data2ui/images/moon/4.svg"
"data2ui/images/moon/1.svg"
"data2ui/images/moon/1.svg"
"data2ui/images/moon/1.svg"
"data2ui/images/moon/1.svg"
Twig\Error\RuntimeError {#1086 -lineno: 324 -rawMessage: "An exception has been thrown during the rendering of a template ("Failed to start the session because headers have already been sent by "/srv/web-meteobretagne2025/vendor/symfony/var-dumper/Dumper/AbstractDumper.php" at line 178.")." -source: Twig\Source {#1710 -code: """ <!DOCTYPE html>\n <html>\n <head>\n {% block importmap %}{% endblock %}\n {% block head_extra %}{% endblock %}\n \n <meta charset="UTF-8">\n <meta http-equiv="X-UA-Compatible" content="IE=edge"/>\n <link rel="shortcut icon" type="image/x-icon" href="{{ asset('/images/favicon.ico') }}"/>\n <meta name="viewport" content="width=device-width, initial-scale=1"/>\n <title>{% block title %}- Météo Bretagne{% endblock %}</title>\n \n {# CSS externes #}\n <link rel="stylesheet"\n href="https://cdn.jsdelivr.net/npm/@eonasdan/tempus-dominus@6.10.4/dist/css/tempus-dominus.min.css">\n \n {% block stylesheets %}\n <link rel="stylesheet" href="{{ asset('styles/app.scss') }}">\n <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@10.6.1/ol.css">\n {% endblock %}\n \n {% block javascripts %}\n <script>\n window.static_assets = {\n {% for a in assets %}\n "{{ a }}": "{{ asset(a) }}",\n {% endfor %}\n };\n </script>\n \n <script src="https://cdn.jsdelivr.net/npm/ol@10.6.1/dist/ol.js"></script>\n {# <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>#}\n {% endblock %}\n </head>\n \n \n <body class="d-flex flex-column position-relative">\n \n <div id="bg-sun" class="text-start ps-4 d-flex flex column justify-content-center align-items-center">\n </div>\n \n \n {% set menuItems = {\n 'forecast':{\n 'label':'Prévisions',\n 'icon':'fa-sun-cloud text-white',\n 'href': '#',\n 'menu_category': 'forecast',\n 'subItems': {\n 'bulletin': {\n 'title': 'Bulletin TV',\n 'icon': 'fa-duotone fa-tv',\n 'items': {\n 'last_bulletin':{'href':path('show_bulletin_video'), 'label': 'Bulletin météo expertisé'}\n }\n },\n 'subForecastMap': {\n 'title': 'Cartes',\n 'icon': 'fa-duotone fa-map',\n 'items': {\n 'region_britanny':{'href':path('forecast_region'),'label':'Bretagne'},\n 'department_cotes_darmor':{'href':path('forecast_department', {'department': 'cotes-d-armor'}),'label':"Côtes-D'armor"},\n 'department_finistere':{'href':path('forecast_department', {'department': 'finistere'}),'label':"Finistère"},\n 'department_ille_et_vilaine':{'href':path('forecast_department', {'department': 'ille-et-vilaine'}),'label':"Ille-et-Vilaine"},\n 'department_loire_atlantique':{'href':path('forecast_department', {'department': 'loire-atlantique'}),'label':"Loire-Atlantique"},\n 'department_morbihan':{'href':path('forecast_department', {'department': 'morbihan'}),'label':"Morbihan"}\n }\n },\n 'subForecastCity': {\n 'title': 'Localité',\n 'icon': 'fa-duotone fa-marker',\n 'items': {\n 'ville':{'href':path('forecast_city_public'),'label':'Météo à 14 jours'},\n 'agri':{'href':path('forecast_city_farmer'),'label':'Météo agricole'},\n 'btp':{'href':path('forecast_city_btp'),'label':'Météo BTP'}\n }\n },\n 'subForecastBeach': {\n 'title': 'Plages',\n 'icon': 'fa-duotone fa-wave',\n 'items': {\n 'ville':{'href':path('beach_forecast_brittany'),'label':'Météo à 3 jours'}\n }\n },\n 'other_services': {\n 'title': 'Autre services',\n 'icon': 'fa-duotone fa-sun-cloud',\n 'items': {\n 'briefing':{'href':'https://www.meteo-concept.fr/previsions/echange-previsionniste','label':'Briefing météo', 'target':'_blank'},\n }\n },\n }\n },\n 'observations':{\n 'label':'Observations',\n 'icon':'fa-chart-bar text-white',\n 'menu_category': 'observations',\n 'subItems': {\n 'subObsMaps': {\n 'title': 'Cartes',\n 'icon': 'fa-duotone fa-map',\n 'items': {\n 'map_temperature_britanny':{'href':path('observations'),'label':'Observations en bretagne'},\n }\n },\n 'subObsStation': {\n 'title': 'Stations',\n 'icon': 'fa-duotone fa-map',\n 'items': {\n 'data_station_date':{'href':path('observations_single_station'),'label':'Données par station'},\n }\n },\n 'networks': {\n 'title': 'Réseaux de stations',\n 'icon': 'fa-duotone fa-cogs',\n 'items': {\n 'networks':{'href':path('networks'),'label':'Les réseaux'},\n }\n },\n }\n },\n 'climatology':{\n 'label':'Climatologie',\n 'icon':'fa-chart-line text-white',\n 'href': path('load_obsclim_form', {'typeData':'daily_climatology','typeDisplay':'tableau','status':'load'}),\n 'menu_category': 'climatology',\n 'subItems': {\n 'climatology': {\n 'title': 'Cartes',\n 'icon': 'fa-duotone fa-map',\n 'items': {\n 'climatology_brittany':{'href':path('climatology_brittany'),'label':'Climatologie en Bretagne'},\n }\n },\n 'single_station': {\n 'title': 'Historiques par station',\n 'icon': 'fa-duotone fa-map',\n 'items': {\n 'climatology_station_year':{'href':path('climatology_single_station_year', {'period': "now"|date("Y")}),'label':'Données par année'},\n 'climatology_station_month':{'href':path('climatology_single_station_month', {'periodLabel':'mois','period':'now'|date('Y-m', 'Europe/Paris')}),'label':'Données par mois'},\n }\n },\n 'normals': {\n 'title': 'Normales climatiques',\n 'icon': 'fa-duotone fa-map',\n 'items': {\n 'normals_brittany':{'href':path('climatology_generic_brittany', {'type': 'normales'}),'label':'Bretagne'},\n 'normals_station':{'href':path('climatology_normals_station'),'label':'Station météo'}\n }\n },\n 'records': {\n 'title': 'Records climatiques',\n 'icon': 'fa-duotone fa-award',\n 'items': {\n 'records_brittany':{'href':path('climatology_generic_brittany', {'type':'records'}),'label':'Bretagne'},\n 'records_station':{'href':path('climatology_records_station'),'label':'Station'},\n }\n },\n }\n },\n 'risks_alerts':{\n 'label':'Risques / Alertes',\n 'icon':'fa-exclamation-triangle text-white', 'href':'#',\n 'menu_category': 'risks',\n 'subItems': {\n 'situation_and_risks': {\n 'title': 'Situation et risques',\n 'icon': 'fa-duotone fa-triangle-exclamation',\n 'items': {\n 'last_bulletin':{'href':path('risk_map'),'label':'Dernier bulletin'},\n }\n },\n 'normals': {\n 'title': 'Phénomènes météo',\n 'icon': 'fa-duotone fa-cloud-rain',\n 'items': {\n 'normals_brittany':{'href':path('phenomena_map'),'label':'Cartes de probabilité'},\n }\n },\n }\n },\n 'list_news':{'label':'Actualités', 'icon':'fa-newspaper text-white',\n 'href': '#',\n 'menu_category': 'news',\n 'subItems': {\n 0: {\n 'title': 'Actualités météo',\n 'icon': 'fa-duotone fa-newspaper',\n 'items': {\n 'list_news': {'href': path('list_news', {'articleCategory':'tout', 'page':1}), 'label': 'Toutes les actualités'},\n 'list_news_france_mc': {'href': 'https://www.meteo-concept.fr/actualites-meteo', 'label': 'France', 'target':'_blank'},\n }\n },\n 1: {\n 'title': 'Catégories',\n 'icon': 'fa-duotone fa-sun-cloud',\n 'items': {\n 'list_news_britanny': {'href': path('list_news', {'articleCategory':'bretagne','page':1}), 'label': 'Bretagne'},\n 'list_news_forecast': {'href': path('list_news', {'articleCategory':'previsions','page':1}), 'label': 'Prévisions'},\n 'list_news_suivi': {'href': path('list_news', {'articleCategory':'suivi','page':1}), 'label': 'Suivi'},\n 'list_news_bilan': {'href': path('list_news', {'articleCategory':'bilan','page':1}), 'label': 'Bilan'},\n 'list_news_short': {'href': path('list_news', {'articleCategory':'breve','page':1}), 'label': 'Brèves'},\n }\n }\n }\n },\n 'services':{\n 'label':'Services',\n 'icon':'fa-suitcase text-white', 'href':'#',\n 'menu_category': 'services',\n 'subItems': {\n 'subOnlineServices': {\n 'title': 'Services en ligne',\n 'icon': 'fa-duotone fa-cart-shopping',\n 'items': {\n 'btp':{'href': path('free_services_site'),'label':'Services gratuits'},\n }\n },\n 'subOtherServices': {\n 'title': 'Autres produits et services',\n 'icon': 'fa-duotone fa-box-open-full',\n 'items': {\n 'webservicesapi':{'href': 'https://api.meteo-concept.com/','label':'webservices / API', 'target':'_blank'},\n 'meteodata':{'href': 'https://www.meteodata.fr/','label':'MétéoData: Observations et réseaux météo', 'target':'_blank'},\n 'meteoshopping':{'href': 'https://www.meteo-shopping.fr/','label':'Météo Shopping: Instruments de mesures', 'target':'_blank'},\n }\n }\n }\n }\n } %}\n \n <div id="main-header-block">\n <div class="container-fluid container-xl">\n <img class="img-fluid d-none d-md-block"\n src="{{ asset('images/marque-bretagne-vertical.png') }}"\n style="position:absolute;top:0px;left:0;height: 135px;z-index:10;"\n alt="Marque Bretagne"\n />\n <div class="row g-0">\n <div class="col-7 col-sm-5 col-md-2 text-md-center d-flex flex-column justify-content-center">\n <a class="logo-link mt-1 ps-3 ps-md-0" href="{{ path('home') }}" style="z-index:2;">\n <img class="img-fluid" src="{{ asset('images/logo-meteo-bretagne.png') }}"\n alt="Météo Bretagne" style="max-height:90px;">\n </a>\n </div>\n <div class="col-5 col-sm-7 col-md-10 d-flex flex-column justify-content-center">\n \n <div class="d-none d-md-block">\n {% include 'menu.html.twig' %}\n </div>\n {# BOUTON MOBILE (visible < md) #}\n <div class="d-md-none d-flex w-100 justify-content-end align-items-center pe-3">\n <button class="navbar-toggler btn btn-primary rounded-2 p-3 my-2 fs-5"\n type="button"\n data-bs-toggle="collapse"\n data-bs-target="#menu-links-mobile"\n aria-controls="menu-links-mobile"\n aria-expanded="false"\n aria-label="Toggle navigation">\n <span class="text-white-d20">MENU</span>\n <i class="fa fa-bars text-white"></i>\n </button>\n <div>\n \n </div>\n </div>\n \n </div>\n </div>\n </div>\n <div class="position-relative" style="top:-5px;z-index:1;">\n {% include 'svg-decoration.html.twig' with { 'class' : 'wave-white absolute-top wave-header' } %}\n </div>\n </div>\n \n \n \n \n {% set pub = (pub is defined ? pub : true) and not is_granted('subscriber-level access') %}\n \n {#{% if app.request.attributes.get('_route') == 'home' %}mt-3{% endif %}#}\n <div id="content"\n class="container-fluid container-lg flex-grow-1 p-2">\n \n {% include 'menu_mobile.html.twig' %}\n \n {% include 'clouds/cloud-1.html.twig' with { 'cloud_shape' : 'cloud-shape-tertiary-l50', 'cloud_shadow' : 'cloud-shadow-tertiary-l60'} %}\n {% include 'clouds/cloud-2.html.twig' with { 'cloud_shape' : 'cloud-shape-tertiary-l50', 'cloud_shadow' : 'cloud-shadow-tertiary-l60'} %}\n {# {% include 'clouds/cloud-3.html.twig' with { 'cloud_shape' : 'cloud-shape-tertiary-l50', 'cloud_shadow' : 'cloud-shadow-tertiary-l60'} %} #}\n \n <div class="row g-2 h-100">\n <div class="col-md-1 order-2 order-md-1 d-md-block col-lg text-center position-relative mt-md-5 pt-md-5">\n <div id="social-networks-icons"></div>\n {% include 'list_icons.html.twig' with {'badges_indexes': ['pointbzh','breizh5-5'] } %}\n </div>\n <div class="order-1 order-md-2 col-md-10 col-lg-9 position-relative" id="main-content">\n \n {% if app.request.attributes.get('_route') != 'home' %}\n <div class="col-8 d-none d-md-block mb-3">\n <ul id="breadcrumb"\n class="border-bottom-tertiary-l20 text-small fw-cabinet-grotesk-light p-0 m-0">\n <li><span class="icomoon-lighthouse text-black" style="font-size:2rem;"></span></li>\n <li><a href="{{ path('home') }}">Accueil</a></li>\n {% block breadcrumb %}{% endblock %}\n </ul>\n </div>\n {% endif %}\n \n {% block page_title_block %}\n {% if block('page_title') is defined %}\n {% include 'title.html.twig' with {'title': block('page_title'), 'class': 'main-page-title', 'title_size':'big'} %}\n {% endif %}\n {% endblock %}\n \n {# The toolbar for the editors #}\n {% if is_granted('ROLE_ADMIN') %}\n {% block editor_toolbar %}\n {% block editor_toolbar_buttons %}\n {% endblock %}\n {% endblock %}\n {% endif %}\n \n \n {% for type, messages in app.flashes %}\n {% for message in messages %}\n <div class="alert alert-{{ type }} mt-3" role="alert">\n {{ message }}\n </div>\n {% endfor %}\n {% endfor %}\n \n \n <div id="alertsWrapper"></div>\n \n \n {% block body %}\n \n {% block horizontal_pub %}\n <!-- meteo.bzh-horizontal -->\n <div id="MeteoBZH_MTF_970x250" class="ads bg-white-d5 rounded-3" style="min-height: 250px;"></div>\n {% endblock %}\n {% block horizontal_pub_970_728 %}\n <!-- meteo.bzh-horizontal -->\n <div id="MeteoBZH_BTF_728x90" class="ads bg-white-d5 rounded-3" style="min-height: 90px;"></div>\n {% endblock %}\n {% block vertical_pub %}\n <!-- meteo.bzh-vertical -->\n <div id="MeteoBZH_ATF_300x600" class="ads rounded-3" style="min-height: 600px;"></div>\n {% endblock %}\n {% block pave_pub %}\n {% include 'ads/_pave_pub.html.twig' %}\n {% endblock %}\n {% block pave_b__pub %}\n <!-- meteo.bzh-vertical -->\n <div id="MeteoBZH_MTF2_300x250" class="ads bg-white-d5 rounded-3 mt-3"\n style="min-height: 250px;"></div>\n {% endblock %}\n {% block outbrain_footer_pub %}\n <div class="bg-white-d5 rounded-3">\n <div class="OUTBRAIN" data-src="{{ app.request.uri }}" data-widget-id="GS_1"\n data-ob-template="Meteo.bzh"></div>\n </div>\n {% endblock %}\n {% block outbrain_list_pub %}\n <div class="OUTBRAIN my-3 rounded-3" style="min-height: 200px;" data-src="{{ app.request.uri }}"\n data-widget-id="GS_7"></div>\n {% endblock %}\n \n {% endblock %}\n \n \n </div>\n \n <div class="order-3 order-md-3 d-md-block col-md-1 col-lg text-center mt-md-5 pt-md-5">\n \n {% include 'list_icons.html.twig' with {'badges_indexes': ['profile','login','logout','shop','contact','admin'], 'css': 'd-none d-md-block' } %}\n \n {# {% include 'list_icons_app_mobile.html.twig' %} #}\n \n </div>\n \n </div>\n \n </div>\n \n {% include 'footer.html.twig' %}\n \n \n {# <script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script> #}\n {# <script src="{{ path('fos_js_routing_js', { callback: 'fos.Router.setData'}) }}"></script> #}\n \n \n </body>\n </html>\n """ -name: "base.html.twig" -path: "/srv/web-meteobretagne2025/templates/base.html.twig" } -phpFile: "/srv/web-meteobretagne2025/vendor/twig/twig/src/Template.php" -phpLine: 416 }
{% endblock %} {% endblock %} {% endif %} {% for type, messages in app.flashes %} {% for message in messages %} <div class="alert alert-{{ type }} mt-3" role="alert"> {{ message }} </div> {% endfor %} $macros = $this->macros; $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"]; $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "forecast/city.html.twig")); $this->parent = $this->load("base.html.twig", 1); yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks)); $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof); } { $context += $this->env->getGlobals(); $blocks = array_merge($this->blocks, $blocks); try { yield from $this->doDisplay($context, $blocks); } catch (Error $e) { if (!$e->getSourceContext()) { $e->setSourceContext($this->getSourceContext()); } return $this->blocks; } public function display(array $context, array $blocks = []): void { foreach ($this->yield($context, $blocks) as $data) { echo $data; } } public function render(array $context): string ob_start(); } else { ob_start(function () { return ''; }); } try { $this->display($context); } catch (\Throwable $e) { while (ob_get_level() > $level) { ob_end_clean(); } yield from $this->template->yieldBlock($name, $context); } public function render(array $context = []): string { return $this->template->render($context); } /** * @return void */ * @throws SyntaxError When an error occurred during compilation * @throws RuntimeError When an error occurred during rendering */ public function render($name, array $context = []): string { return $this->load($name)->render($context); } /** * Displays a template. * if (null !== $block) { return $this->container->get('twig')->load($view)->renderBlock($block, $parameters); } return $this->container->get('twig')->render($view, $parameters); } private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response { $content = $this->doRenderView($view, $block, $parameters, $method); return $this->container->get('twig')->render($view, $parameters); } private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response { $content = $this->doRenderView($view, $block, $parameters, $method); $response ??= new Response(); if (200 === $response->getStatusCode()) { foreach ($parameters as $v) { if ($v instanceof FormInterface && $v->isSubmitted() && !$v->isValid()) { * If an invalid form is found in the list of parameters, a 422 status code is returned. * Forms found in parameters are auto-cast to form views. */ protected function render(string $view, array $parameters = [], ?Response $response = null): Response { return $this->doRender($view, null, $parameters, $response, __FUNCTION__); } /** * Renders a block in a view. * $targetLabel = $this->getTargetLabel($target); $titleType = $targetLabel ? ' (' . $targetLabel . ') ' : ' '; $fullTitle = 'Prévisions météo' . $titleType . 'à ' . $city->getName(); $metaTitle = $fullTitle . ' - Météo Bretagne'; return $this->render('forecast/city.html.twig', [ 'canonical_url' => $this->getCanonicalForecastCityUrl($target, $city), 'risks' => $risks, 'target' => $target, 'full_title' => $fullTitle, 'meta_title' => $metaTitle, Data2uiForecastController $data2uiForecastController, int $day = 0, ?int $period = null, #[ValueResolver('city_converter')] ?City $city = null ): Response { return $this->doGetForecastForCity($request, $data2uiForecastController, $day, $period, 'farmer', $city); } #[Route( path: '/btp/ville/{city}/{day}/{period}', name: 'forecast_city_btp', $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; } if (!$this->handlingHttpCache) { $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());<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';date_default_timezone_set('Europe/Paris');return function (array $context) { return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); if (\PHP_SESSION_ACTIVE === session_status()) { throw new \RuntimeException('Failed to start the session: already started by PHP.'); } if (filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOL) && headers_sent($file, $line)) { throw new \RuntimeException(\sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line)); } $sessionId = $_COOKIE[session_name()] ?? null; /* * Explanation of the session ID regular expression: `/^[a-zA-Z0-9,-]{22,250}$/`. } if (!$this->started && $this->saveHandler->isActive()) { $this->loadSession(); } elseif (!$this->started) { $this->start(); } return $this->bags[$name]; } $this->storage->registerBag(new SessionBagProxy($bag, $this->data, $this->usageIndex, $this->usageReporter)); } public function getBag(string $name): SessionBagInterface { $bag = $this->storage->getBag($name); return method_exists($bag, 'getBag') ? $bag->getBag() : $bag; } /** /** * Gets the flashbag interface. */ public function getFlashBag(): FlashBagInterface { return $this->getBag($this->flashName); } /** * Gets the attributebag interface. * if (!method_exists($session, 'getFlashBag')) { return []; } if (null === $types || '' === $types || [] === $types) { return $session->getFlashBag()->all(); } if (\is_string($types)) { return $session->getFlashBag()->get($types); } } // Some objects throw exceptions when they have __call, and the method we try // to call is not supported. If ignoreStrictCheck is true, we should return null. try { $ret = $object->$method(...$arguments); } catch (\BadMethodCallException $e) { if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) { return; } throw $e; yield " "; // line 324 $context['_parent'] = $context; $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 324, $this->source); })()), "flashes", [], "any", false, false, false, 324)); foreach ($context['_seq'] as $context["type"] => $context["messages"]) { // line 325 yield " "; $context['_parent'] = $context; $context['_seq'] = CoreExtension::ensureTraversable($context["messages"]); { $context += $this->env->getGlobals(); $blocks = array_merge($this->blocks, $blocks); try { yield from $this->doDisplay($context, $blocks); } catch (Error $e) { if (!$e->getSourceContext()) { $e->setSourceContext($this->getSourceContext()); } $macros = $this->macros; $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"]; $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "forecast/city.html.twig")); $this->parent = $this->load("base.html.twig", 1); yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks)); $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof); } { $context += $this->env->getGlobals(); $blocks = array_merge($this->blocks, $blocks); try { yield from $this->doDisplay($context, $blocks); } catch (Error $e) { if (!$e->getSourceContext()) { $e->setSourceContext($this->getSourceContext()); } return $this->blocks; } public function display(array $context, array $blocks = []): void { foreach ($this->yield($context, $blocks) as $data) { echo $data; } } public function render(array $context): string ob_start(); } else { ob_start(function () { return ''; }); } try { $this->display($context); } catch (\Throwable $e) { while (ob_get_level() > $level) { ob_end_clean(); } yield from $this->template->yieldBlock($name, $context); } public function render(array $context = []): string { return $this->template->render($context); } /** * @return void */ * @throws SyntaxError When an error occurred during compilation * @throws RuntimeError When an error occurred during rendering */ public function render($name, array $context = []): string { return $this->load($name)->render($context); } /** * Displays a template. * if (null !== $block) { return $this->container->get('twig')->load($view)->renderBlock($block, $parameters); } return $this->container->get('twig')->render($view, $parameters); } private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response { $content = $this->doRenderView($view, $block, $parameters, $method); return $this->container->get('twig')->render($view, $parameters); } private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response { $content = $this->doRenderView($view, $block, $parameters, $method); $response ??= new Response(); if (200 === $response->getStatusCode()) { foreach ($parameters as $v) { if ($v instanceof FormInterface && $v->isSubmitted() && !$v->isValid()) { * If an invalid form is found in the list of parameters, a 422 status code is returned. * Forms found in parameters are auto-cast to form views. */ protected function render(string $view, array $parameters = [], ?Response $response = null): Response { return $this->doRender($view, null, $parameters, $response, __FUNCTION__); } /** * Renders a block in a view. * $targetLabel = $this->getTargetLabel($target); $titleType = $targetLabel ? ' (' . $targetLabel . ') ' : ' '; $fullTitle = 'Prévisions météo' . $titleType . 'à ' . $city->getName(); $metaTitle = $fullTitle . ' - Météo Bretagne'; return $this->render('forecast/city.html.twig', [ 'canonical_url' => $this->getCanonicalForecastCityUrl($target, $city), 'risks' => $risks, 'target' => $target, 'full_title' => $fullTitle, 'meta_title' => $metaTitle, Data2uiForecastController $data2uiForecastController, int $day = 0, ?int $period = null, #[ValueResolver('city_converter')] ?City $city = null ): Response { return $this->doGetForecastForCity($request, $data2uiForecastController, $day, $period, 'farmer', $city); } #[Route( path: '/btp/ville/{city}/{day}/{period}', name: 'forecast_city_btp', $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; } if (!$this->handlingHttpCache) { $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());<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';date_default_timezone_set('Europe/Paris');return function (array $context) { return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);|
[2/2]
RuntimeError
|
|---|
Twig\Error\RuntimeError:
An exception has been thrown during the rendering of a template ("Failed to start the session because headers have already been sent by "/srv/web-meteobretagne2025/vendor/symfony/var-dumper/Dumper/AbstractDumper.php" at line 178.") in "base.html.twig" at line 324.
at templates/base.html.twig:324
at Twig\Template->yield()
(var/cache/prod/twig/1a/1a44b5bdbc6054ef8db1dea0e5f492fc.php:59)
at __TwigTemplate_683fafbe89a941da6cefaa21d4e9209b->doDisplay()
(vendor/twig/twig/src/Template.php:402)
at Twig\Template->yield()
(vendor/twig/twig/src/Template.php:358)
at Twig\Template->display()
(vendor/twig/twig/src/Template.php:373)
at Twig\Template->render()
(vendor/twig/twig/src/TemplateWrapper.php:51)
at Twig\TemplateWrapper->render()
(vendor/twig/twig/src/Environment.php:333)
at Twig\Environment->render()
(vendor/symfony/framework-bundle/Controller/AbstractController.php:452)
at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRenderView()
(vendor/symfony/framework-bundle/Controller/AbstractController.php:457)
at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRender()
(vendor/symfony/framework-bundle/Controller/AbstractController.php:257)
at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render()
(src/Controller/ForecastController.php:409)
at App\Controller\ForecastController->doGetForecastForCity()
(src/Controller/ForecastController.php:337)
at App\Controller\ForecastController->getForecastForCityFarmer()
(vendor/symfony/http-kernel/HttpKernel.php:181)
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:208)
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:29)
at require_once('/srv/web-meteobretagne2025/vendor/autoload_runtime.php')
(public/index.php:5)
|
|
[1/2]
RuntimeException
|
|---|
RuntimeException:
Failed to start the session because headers have already been sent by "/srv/web-meteobretagne2025/vendor/symfony/var-dumper/Dumper/AbstractDumper.php" at line 178.
at vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:132
at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
(vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:311)
at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag()
(vendor/symfony/http-foundation/Session/Session.php:222)
at Symfony\Component\HttpFoundation\Session\Session->getBag()
(vendor/symfony/http-foundation/Session/Session.php:232)
at Symfony\Component\HttpFoundation\Session\Session->getFlashBag()
(vendor/symfony/twig-bridge/AppVariable.php:196)
at Symfony\Bridge\Twig\AppVariable->getFlashes()
(vendor/twig/twig/src/Extension/CoreExtension.php:1919)
at Twig\Extension\CoreExtension::getAttribute()
(var/cache/prod/twig/a5/a545c2a603d0f44878d8c84a93804bdf.php:254)
at __TwigTemplate_008cb753cec821546370d5ca963ad6ec->doDisplay()
(vendor/twig/twig/src/Template.php:402)
at Twig\Template->yield()
(var/cache/prod/twig/1a/1a44b5bdbc6054ef8db1dea0e5f492fc.php:59)
at __TwigTemplate_683fafbe89a941da6cefaa21d4e9209b->doDisplay()
(vendor/twig/twig/src/Template.php:402)
at Twig\Template->yield()
(vendor/twig/twig/src/Template.php:358)
at Twig\Template->display()
(vendor/twig/twig/src/Template.php:373)
at Twig\Template->render()
(vendor/twig/twig/src/TemplateWrapper.php:51)
at Twig\TemplateWrapper->render()
(vendor/twig/twig/src/Environment.php:333)
at Twig\Environment->render()
(vendor/symfony/framework-bundle/Controller/AbstractController.php:452)
at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRenderView()
(vendor/symfony/framework-bundle/Controller/AbstractController.php:457)
at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRender()
(vendor/symfony/framework-bundle/Controller/AbstractController.php:257)
at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render()
(src/Controller/ForecastController.php:409)
at App\Controller\ForecastController->doGetForecastForCity()
(src/Controller/ForecastController.php:337)
at App\Controller\ForecastController->getForecastForCityFarmer()
(vendor/symfony/http-kernel/HttpKernel.php:181)
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:208)
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:29)
at require_once('/srv/web-meteobretagne2025/vendor/autoload_runtime.php')
(public/index.php:5)
|