Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | yes/no |
RFC? | yes/no |
Symfony version | 3.2.9 |
Well, this could be some sort of a feature, look at this simple code I have:
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
* @Route(
* "/bug/{slug}.{_format}",
* defaults={"_format":"html"}
* )
*/
public function isBug($format){
return new Response($format);
}
I am passing 'mistakenly' the undefined variable $format
to a method, instead of $_format
.
Now, when I go to http://localhost/bug/anything.rss
I get to see a 724 lines of codes raw html, css, php code. It seems like the profiler just gets outputted directly into the browser.
For those who would like to see the image result here is one
I don't know what is causing this.