Skip to content

Commit

Permalink
bluescreen: checks if $_SERVER['argv'] is set (#568)
Browse files Browse the repository at this point in the history
  • Loading branch information
janfejtek authored Jul 30, 2023
1 parent 209ac30 commit d2d5a64
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Tracy/BlueScreen/assets/section-cli.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,19 @@ if (!Helpers::isCli()) {

<div class="tracy-section-panel tracy-collapsed">
<h3>Process ID <?= Helpers::escapeHtml(getmypid()) ?></h3>
<?php if (str_contains($source, '):')): ?>
<pre>php<?= Helpers::escapeHtml(explode('):', $source, 2)[1]) ?></pre>
<?php endif; ?>

<?php if (isset($_SERVER['argv'])): ?>
<h3>Arguments</h3>
<div class="tracy-pane">
<table>
<?php foreach ($_SERVER['argv'] as $k => $v): ?>
<?php foreach ($_SERVER['argv'] as $k => $v): ?>
<tr><th><?= Helpers::escapeHtml($k) ?></th><td><?= $dump($v, $k) ?></td></tr>
<?php endforeach ?>
<?php endforeach ?>
</table>
</div>
<?php endif; ?>
</div>
</section>

0 comments on commit d2d5a64

Please sign in to comment.