Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/web-eco-lab/www/tsubomi_hoiku/tsubomi/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2636

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/web-eco-lab/www/tsubomi_hoiku/tsubomi/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php on line 2665
Failed to start the session because headers have already been sent by "/home/web-eco-lab/www/tsubomi_hoiku/tsubomi/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php" at line 2636. (500Internal Server Error)

Symfony Exception

RuntimeException

HTTP500 Internal Server Error

Failed to start the session because headers have already been sent by "/home/web-eco-lab/www/tsubomi_hoiku/tsubomi/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php" at line 2636.

Exception

RuntimeException

  1.         if (\PHP_SESSION_ACTIVE === session_status()) {
  2.             throw new \RuntimeException('Failed to start the session: already started by PHP.');
  3.         }
  4.         if (ini_get('session.use_cookies') && 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.         // ok to try and start the session
  8.         if (!session_start()) {
  9.             throw new \RuntimeException('Failed to start the session');
  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.     }
NativeSessionStorage->getBag('attributes') in vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php (line256)
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     public function getBag($name)
  5.     {
  6.         return $this->storage->getBag($name)->getBag();
  7.     }
  8.     /**
  9.      * Gets the flashbag interface.
  10.      *
  1.      *
  2.      * @return AttributeBagInterface
  3.      */
  4.     private function getAttributeBag()
  5.     {
  6.         return $this->getBag($this->attributeName);
  7.     }
  8. }
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     public function get($name$default null)
  5.     {
  6.         return $this->getAttributeBag()->get($name$default);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      */
Session->get('message') in src/AppBundle/Controller/FTNBaseController.php (line76)
  1.    }
  2.    protected  function getMessages() {
  3.        $session $this->container->get('session');
  4.        if ($session->get("message") == null) {
  5.            $session->set("message", array());
  6.        }
  7.        $messages $session->get('message');
  8.        $session->set('message', array());
FTNBaseController->getMessages() in src/AppBundle/Controller/FTNBaseController.php (line34)
  1.      */
  2.     protected function render($view, array $parameters = array(), Response $response null)
  3.     {
  4.         $parameters += array('messages' => $this->getMessages());
  5.         // 未ログインアクセス可能でなくて、ログイン名がない場合はログイン画面に遷移
  6.         $session $this->container->get('session');
  7.         $request $this->container->get('request_stack')->getCurrentRequest();
  8.         if ($request->get('freedisplay') != true && ($session->get('loginid') == null || $session->get('loginid') == "")) {
FTNBaseController->render('front/index.html.twig', array('newses' => array(object(News), object(News), object(News)))) in src/AppBundle/Controller/Front/FrontController.php (line34)
  1.         $em $this->getDoctrine()->getManager();
  2.         $nRepo $em->getRepository('AppBundle:News');
  3.         $newses $nRepo->findBy(['isPublish' => '1'],['date' => 'desc'], 3);
  4.         return $this->render('front/index.html.twig', ['newses' => $newses]);
  5.     }
  6.     /**
  7.      * @Route("/entry")
  8.      */
FrontController->indexAction(object(Request)) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line151)
  1.         $this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS$event);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response = \call_user_func_array($controller$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new GetResponseForControllerResultEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch(KernelEvents::VIEW$event);
HttpKernel->handleRaw(object(Request), 1) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line68)
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level'ob_get_level());
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
HttpKernel->handle(object(Request), 1, true) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php (line200)
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle(object(Request)) in web/app.php (line18)
  1. //$kernel = new AppCache($kernel);
  2. // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
  3. //Request::enableHttpMethodParameterOverride();
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Logs

No log messages

Stack Trace

RuntimeException

RuntimeException:Failed to start the session because headers have already been sent by "/home/web-eco-lab/www/tsubomi_hoiku/tsubomi/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php" at line 2636.at vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php:141atSymfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php:295)atSymfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag('attributes')
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php:256)atSymfony\Component\HttpFoundation\Session\Session->getBag('attributes')
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php:278)atSymfony\Component\HttpFoundation\Session\Session->getAttributeBag()
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php:73)atSymfony\Component\HttpFoundation\Session\Session->get('message')
     (src/AppBundle/Controller/FTNBaseController.php:76)atAppBundle\Controller\FTNBaseController->getMessages()
     (src/AppBundle/Controller/FTNBaseController.php:34)atAppBundle\Controller\FTNBaseController->render('front/index.html.twig', array('newses' => array(object(News), object(News), object(News))))
     (src/AppBundle/Controller/Front/FrontController.php:34)atAppBundle\Controller\Front\FrontController->indexAction(object(Request))
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)atSymfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)atSymfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200)atSymfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/app.php:18)