Skip to content

Commit b89f5bd

Browse files
committed
Fix issue where any headers with multiple values was dying in the Debug Toolbar
1 parent ef69cb5 commit b89f5bd

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

system/Debug/Toolbar/View/toolbar.tpl.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,16 @@
187187

188188
<table id="request_headers_table">
189189
<tbody>
190+
190191
<?php foreach ($headers as $header => $value) : ?>
191192
<?php if (empty($value)) continue; ?>
192-
<tr>
193-
<td><?= esc($value->getName()) ?></td>
194-
<td><?= esc($value->getValueLine()) ?></td>
195-
</tr>
193+
<?php if (! is_array($value)) { $value = [$value]; } ?>
194+
<?php foreach ($value as $h) ?>
195+
<tr>
196+
<td><?= esc($h->getName()) ?></td>
197+
<td><?= esc($h->getValueLine()) ?></td>
198+
</tr>
199+
<?php endforeach ?>
196200
<?php endforeach; ?>
197201
</tbody>
198202
</table>

0 commit comments

Comments
 (0)