Ver código fonte

[TwigBundle] Fix trace to not show 'in at line' when file/line are empty.

Danny Berger 13 anos atrás
pai
commit
4858fbe7e0

+ 2 - 2
src/Symfony/Bundle/TwigBundle/Resources/views/Exception/trace.html.twig

@@ -5,10 +5,10 @@
         {{ trace.type ~ trace.function }}
     </strong>
     ({{ trace.args|format_args }})
-    <br />
 {% endif %}
 
-{% if trace.file is defined and trace.line is defined %}
+{% if trace.file is defined and trace.file and trace.line is defined and trace.line %}
+    {{ trace.function ? '<br />' : '' }}
     in {{ trace.file|format_file(trace.line) }}&nbsp;
     {% spaceless %}
     <a href="#" onclick="toggle('trace_{{ prefix ~ '_' ~ i }}'); switchIcons('icon_{{ prefix ~ '_' ~ i }}_open', 'icon_{{ prefix ~ '_' ~ i }}_close'); return false;">