瀏覽代碼

[FrameworkBundle] added a condition to only show current content when it is not empty in the exception template

Fabien Potencier 14 年之前
父節點
當前提交
85f823fc08
共有 1 個文件被更改,包括 9 次插入7 次删除
  1. 9 7
      src/Symfony/Bundle/FrameworkBundle/Resources/views/Exception/exception.php

+ 9 - 7
src/Symfony/Bundle/FrameworkBundle/Resources/views/Exception/exception.php

@@ -49,13 +49,15 @@
         </div>
     <?php endif; ?>
 
-    <div class="block">
-        <h3>Content of the Output <a href="#" onclick="toggle('content'); return false;">&raquo;</a></h3>
+    <?php if ($currentContent): ?>
+        <div class="block">
+            <h3>Content of the Output <a href="#" onclick="toggle('content'); return false;">&raquo;</a></h3>
 
-        <div id="content" style="display: none">
-            <?php echo $currentContent ?>
-        </div>
+            <div id="content" style="display: none">
+                <?php echo $currentContent ?>
+            </div>
 
-        <div style="clear: both"></div>
-    </div>
+            <div style="clear: both"></div>
+        </div>
+    <?php endif; ?>
 </div>