Browse Source

[HttpKernel] removed special case when using the CLI

* This special case means that functional tests run from the CLI behave differently
* It means that web servers created in PHP behave differently
Fabien Potencier 14 years ago
parent
commit
00c7e91182

+ 1 - 2
src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php

@@ -71,8 +71,7 @@ class ExceptionListener
             '_controller' => $this->controller,
             'exception'   => $flattenException,
             'logger'      => $logger,
-            // when using CLI, we force the format to be TXT
-            'format'      => 0 === strncasecmp(PHP_SAPI, 'cli', 3) ? 'txt' : $request->getRequestFormat(),
+            'format'      => $request->getRequestFormat(),
         );
 
         $request = $request->duplicate(null, null, $attributes);