"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"
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. (500 Internal Server Error)

Symfony Exception

RuntimeException RuntimeError

HTTP 500 Internal Server Error

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.

Exceptions 2

Twig\Error\ RuntimeError

Show exception properties
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
}
  1.                     {% endblock %}
  2.                 {% endblock %}
  3.             {% endif %}
  4.             {% for type, messages in app.flashes %}
  5.                 {% for message in messages %}
  6.                     <div class="alert alert-{{ type }} mt-3" role="alert">
  7.                         {{ message }}
  8.                     </div>
  9.                 {% endfor %}
  1.         $macros $this->macros;
  2.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  3.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""forecast/city.html.twig"));
  4.         $this->parent $this->load("base.html.twig"1);
  5.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  6.         
  7.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  8.     }
in vendor/twig/twig/src/Template.php -> doDisplay (line 402)
  1.     {
  2.         $context += $this->env->getGlobals();
  3.         $blocks array_merge($this->blocks$blocks);
  4.         try {
  5.             yield from $this->doDisplay($context$blocks);
  6.         } catch (Error $e) {
  7.             if (!$e->getSourceContext()) {
  8.                 $e->setSourceContext($this->getSourceContext());
  9.             }
  1.         return $this->blocks;
  2.     }
  3.     public function display(array $context, array $blocks = []): void
  4.     {
  5.         foreach ($this->yield($context$blocks) as $data) {
  6.             echo $data;
  7.         }
  8.     }
  9.     public function render(array $context): string
in vendor/twig/twig/src/Template.php -> display (line 373)
  1.                 ob_start();
  2.             } else {
  3.                 ob_start(function () { return ''; });
  4.             }
  5.             try {
  6.                 $this->display($context);
  7.             } catch (\Throwable $e) {
  8.                 while (ob_get_level() > $level) {
  9.                     ob_end_clean();
  10.                 }
  1.         yield from $this->template->yieldBlock($name$context);
  2.     }
  3.     public function render(array $context = []): string
  4.     {
  5.         return $this->template->render($context);
  6.     }
  7.     /**
  8.      * @return void
  9.      */
  1.      * @throws SyntaxError  When an error occurred during compilation
  2.      * @throws RuntimeError When an error occurred during rendering
  3.      */
  4.     public function render($name, array $context = []): string
  5.     {
  6.         return $this->load($name)->render($context);
  7.     }
  8.     /**
  9.      * Displays a template.
  10.      *
  1.         if (null !== $block) {
  2.             return $this->container->get('twig')->load($view)->renderBlock($block$parameters);
  3.         }
  4.         return $this->container->get('twig')->render($view$parameters);
  5.     }
  6.     private function doRender(string $view, ?string $block, array $parameters, ?Response $responsestring $method): Response
  7.     {
  8.         $content $this->doRenderView($view$block$parameters$method);
  1.         return $this->container->get('twig')->render($view$parameters);
  2.     }
  3.     private function doRender(string $view, ?string $block, array $parameters, ?Response $responsestring $method): Response
  4.     {
  5.         $content $this->doRenderView($view$block$parameters$method);
  6.         $response ??= new Response();
  7.         if (200 === $response->getStatusCode()) {
  8.             foreach ($parameters as $v) {
  9.                 if ($v instanceof FormInterface && $v->isSubmitted() && !$v->isValid()) {
  1.      * If an invalid form is found in the list of parameters, a 422 status code is returned.
  2.      * Forms found in parameters are auto-cast to form views.
  3.      */
  4.     protected function render(string $view, array $parameters = [], ?Response $response null): Response
  5.     {
  6.         return $this->doRender($viewnull$parameters$response__FUNCTION__);
  7.     }
  8.     /**
  9.      * Renders a block in a view.
  10.      *
AbstractController->render() in src/Controller/ForecastController.php (line 409)
  1.         $targetLabel $this->getTargetLabel($target);
  2.         $titleType $targetLabel ' (' $targetLabel ') ' ' ';
  3.         $fullTitle 'Prévisions météo' $titleType 'à ' $city->getName();
  4.         $metaTitle $fullTitle ' - Météo Bretagne';
  5.         return $this->render('forecast/city.html.twig', [
  6.             'canonical_url' => $this->getCanonicalForecastCityUrl($target$city),
  7.             'risks' => $risks,
  8.             'target' => $target,
  9.             'full_title' => $fullTitle,
  10.             'meta_title' => $metaTitle,
ForecastController->doGetForecastForCity() in src/Controller/ForecastController.php (line 337)
  1.         Data2uiForecastController $data2uiForecastController,
  2.         int $day 0,
  3.         ?int $period null,
  4.         #[ValueResolver('city_converter')] ?City $city null
  5.     ): Response {
  6.         return $this->doGetForecastForCity($request$data2uiForecastController$day$period'farmer'$city);
  7.     }
  8.     #[Route(
  9.         path'/btp/ville/{city}/{day}/{period}',
  10.         name'forecast_city_btp',
in vendor/symfony/http-kernel/HttpKernel.php -> getForecastForCityFarmer (line 181)
  1.         $this->dispatcher->dispatch($eventKernelEvents::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($eventKernelEvents::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 29)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/srv/web-meteobretagne2025/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. date_default_timezone_set('Europe/Paris');
  5. return function (array $context) {
  6.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);

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.

  1.         if (\PHP_SESSION_ACTIVE === session_status()) {
  2.             throw new \RuntimeException('Failed to start the session: already started by PHP.');
  3.         }
  4.         if (filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOL) && headers_sent($file$line)) {
  5.             throw new \RuntimeException(\sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.'$file$line));
  6.         }
  7.         $sessionId $_COOKIE[session_name()] ?? null;
  8.         /*
  9.          * Explanation of the session ID regular expression: `/^[a-zA-Z0-9,-]{22,250}$/`.
  1.         }
  2.         if (!$this->started && $this->saveHandler->isActive()) {
  3.             $this->loadSession();
  4.         } elseif (!$this->started) {
  5.             $this->start();
  6.         }
  7.         return $this->bags[$name];
  8.     }
  1.         $this->storage->registerBag(new SessionBagProxy($bag$this->data$this->usageIndex$this->usageReporter));
  2.     }
  3.     public function getBag(string $name): SessionBagInterface
  4.     {
  5.         $bag $this->storage->getBag($name);
  6.         return method_exists($bag'getBag') ? $bag->getBag() : $bag;
  7.     }
  8.     /**
  1.     /**
  2.      * Gets the flashbag interface.
  3.      */
  4.     public function getFlashBag(): FlashBagInterface
  5.     {
  6.         return $this->getBag($this->flashName);
  7.     }
  8.     /**
  9.      * Gets the attributebag interface.
  10.      *
  1.         if (!method_exists($session'getFlashBag')) {
  2.             return [];
  3.         }
  4.         if (null === $types || '' === $types || [] === $types) {
  5.             return $session->getFlashBag()->all();
  6.         }
  7.         if (\is_string($types)) {
  8.             return $session->getFlashBag()->get($types);
  9.         }
  1.         }
  2.         // Some objects throw exceptions when they have __call, and the method we try
  3.         // to call is not supported. If ignoreStrictCheck is true, we should return null.
  4.         try {
  5.             $ret $object->$method(...$arguments);
  6.         } catch (\BadMethodCallException $e) {
  7.             if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) {
  8.                 return;
  9.             }
  10.             throw $e;
  1.         yield "
  2.             ";
  3.         // line 324
  4.         $context['_parent'] = $context;
  5.         $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"falsefalsefalse324));
  6.         foreach ($context['_seq'] as $context["type"] => $context["messages"]) {
  7.             // line 325
  8.             yield "                ";
  9.             $context['_parent'] = $context;
  10.             $context['_seq'] = CoreExtension::ensureTraversable($context["messages"]);
in vendor/twig/twig/src/Template.php -> doDisplay (line 402)
  1.     {
  2.         $context += $this->env->getGlobals();
  3.         $blocks array_merge($this->blocks$blocks);
  4.         try {
  5.             yield from $this->doDisplay($context$blocks);
  6.         } catch (Error $e) {
  7.             if (!$e->getSourceContext()) {
  8.                 $e->setSourceContext($this->getSourceContext());
  9.             }
  1.         $macros $this->macros;
  2.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  3.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""forecast/city.html.twig"));
  4.         $this->parent $this->load("base.html.twig"1);
  5.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  6.         
  7.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  8.     }
in vendor/twig/twig/src/Template.php -> doDisplay (line 402)
  1.     {
  2.         $context += $this->env->getGlobals();
  3.         $blocks array_merge($this->blocks$blocks);
  4.         try {
  5.             yield from $this->doDisplay($context$blocks);
  6.         } catch (Error $e) {
  7.             if (!$e->getSourceContext()) {
  8.                 $e->setSourceContext($this->getSourceContext());
  9.             }
  1.         return $this->blocks;
  2.     }
  3.     public function display(array $context, array $blocks = []): void
  4.     {
  5.         foreach ($this->yield($context$blocks) as $data) {
  6.             echo $data;
  7.         }
  8.     }
  9.     public function render(array $context): string
in vendor/twig/twig/src/Template.php -> display (line 373)
  1.                 ob_start();
  2.             } else {
  3.                 ob_start(function () { return ''; });
  4.             }
  5.             try {
  6.                 $this->display($context);
  7.             } catch (\Throwable $e) {
  8.                 while (ob_get_level() > $level) {
  9.                     ob_end_clean();
  10.                 }
  1.         yield from $this->template->yieldBlock($name$context);
  2.     }
  3.     public function render(array $context = []): string
  4.     {
  5.         return $this->template->render($context);
  6.     }
  7.     /**
  8.      * @return void
  9.      */
  1.      * @throws SyntaxError  When an error occurred during compilation
  2.      * @throws RuntimeError When an error occurred during rendering
  3.      */
  4.     public function render($name, array $context = []): string
  5.     {
  6.         return $this->load($name)->render($context);
  7.     }
  8.     /**
  9.      * Displays a template.
  10.      *
  1.         if (null !== $block) {
  2.             return $this->container->get('twig')->load($view)->renderBlock($block$parameters);
  3.         }
  4.         return $this->container->get('twig')->render($view$parameters);
  5.     }
  6.     private function doRender(string $view, ?string $block, array $parameters, ?Response $responsestring $method): Response
  7.     {
  8.         $content $this->doRenderView($view$block$parameters$method);
  1.         return $this->container->get('twig')->render($view$parameters);
  2.     }
  3.     private function doRender(string $view, ?string $block, array $parameters, ?Response $responsestring $method): Response
  4.     {
  5.         $content $this->doRenderView($view$block$parameters$method);
  6.         $response ??= new Response();
  7.         if (200 === $response->getStatusCode()) {
  8.             foreach ($parameters as $v) {
  9.                 if ($v instanceof FormInterface && $v->isSubmitted() && !$v->isValid()) {
  1.      * If an invalid form is found in the list of parameters, a 422 status code is returned.
  2.      * Forms found in parameters are auto-cast to form views.
  3.      */
  4.     protected function render(string $view, array $parameters = [], ?Response $response null): Response
  5.     {
  6.         return $this->doRender($viewnull$parameters$response__FUNCTION__);
  7.     }
  8.     /**
  9.      * Renders a block in a view.
  10.      *
AbstractController->render() in src/Controller/ForecastController.php (line 409)
  1.         $targetLabel $this->getTargetLabel($target);
  2.         $titleType $targetLabel ' (' $targetLabel ') ' ' ';
  3.         $fullTitle 'Prévisions météo' $titleType 'à ' $city->getName();
  4.         $metaTitle $fullTitle ' - Météo Bretagne';
  5.         return $this->render('forecast/city.html.twig', [
  6.             'canonical_url' => $this->getCanonicalForecastCityUrl($target$city),
  7.             'risks' => $risks,
  8.             'target' => $target,
  9.             'full_title' => $fullTitle,
  10.             'meta_title' => $metaTitle,
ForecastController->doGetForecastForCity() in src/Controller/ForecastController.php (line 337)
  1.         Data2uiForecastController $data2uiForecastController,
  2.         int $day 0,
  3.         ?int $period null,
  4.         #[ValueResolver('city_converter')] ?City $city null
  5.     ): Response {
  6.         return $this->doGetForecastForCity($request$data2uiForecastController$day$period'farmer'$city);
  7.     }
  8.     #[Route(
  9.         path'/btp/ville/{city}/{day}/{period}',
  10.         name'forecast_city_btp',
in vendor/symfony/http-kernel/HttpKernel.php -> getForecastForCityFarmer (line 181)
  1.         $this->dispatcher->dispatch($eventKernelEvents::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($eventKernelEvents::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 29)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/srv/web-meteobretagne2025/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. date_default_timezone_set('Europe/Paris');
  5. return function (array $context) {
  6.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);

Stack Traces 2

[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)