Fabien Potencier преди 13 години
родител
ревизия
0fc0f99b9d
променени са 1 файла, в които са добавени 3 реда и са изтрити 5 реда
  1. 3 5
      src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php

+ 3 - 5
src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php

@@ -268,15 +268,13 @@ class ProfilerController extends ContainerAware
             if (!$profiler->has($name)) {
             if (!$profiler->has($name)) {
                 continue;
                 continue;
             }
             }
+
             if ('.html.twig' === substr($template, -10)) {
             if ('.html.twig' === substr($template, -10)) {
                 $template = substr($template, 0, -10);
                 $template = substr($template, 0, -10);
             }
             }
+
             if (!$this->container->get('templating')->exists($template.'.html.twig')) {
             if (!$this->container->get('templating')->exists($template.'.html.twig')) {
-                throw new \UnexpectedValueException(sprintf(
-                    'The profiler template "%s.html.twig" for data collector "%s" does not exist.',
-                    $template,
-                    $name
-                ));
+                throw new \UnexpectedValueException(sprintf('The profiler template "%s.html.twig" for data collector "%s" does not exist.', $template, $name));
             }
             }
 
 
             $templates[$name] = $template.'.html.twig';
             $templates[$name] = $template.'.html.twig';