Only output super globals that are not empty

This commit is contained in:
filp
2013-03-13 11:21:57 +00:00
parent dab2dbbd9e
commit 151b62b63f
+6 -4
View File
@@ -184,10 +184,12 @@
</div>
<div class="superglobals-container">
<?php foreach($v->super as $label => $data): ?>
<div class="superglobal" id="sg-<?php echo $e($slug($label)) ?>">
<label><?php echo $e($label) ?></label>
<pre class="prettyprint"><?php echo $e(print_r($data, true)); ?></pre>
</div>
<?php if(!empty($data)): ?>
<div class="superglobal" id="sg-<?php echo $e($slug($label)) ?>">
<label><?php echo $e($label) ?></label>
<pre class="prettyprint"><?php echo $e(print_r($data, true)); ?></pre>
</div>
<?php endif ?>
<?php endforeach ?>
</div>
</div>