Skip to content

Commit 994023d

Browse files
authored
Merge pull request #7171 from kenjis/fix-error_exception.php
refactor: error_exception.php
2 parents 8fadb29 + 299c76e commit 994023d

1 file changed

Lines changed: 6 additions & 16 deletions

File tree

app/Views/errors/html/error_exception.php

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -283,21 +283,11 @@
283283
</tr>
284284
</thead>
285285
<tbody>
286-
<?php foreach ($headers as $value) : ?>
287-
<?php
288-
if (empty($value)) {
289-
continue;
290-
}
291-
292-
if (! is_array($value)) {
293-
$value = [$value];
294-
} ?>
295-
<?php foreach ($value as $h) : ?>
296-
<tr>
297-
<td><?= esc($h->getName(), 'html') ?></td>
298-
<td><?= esc($h->getValueLine(), 'html') ?></td>
299-
</tr>
300-
<?php endforeach; ?>
286+
<?php foreach ($headers as $header) : ?>
287+
<tr>
288+
<td><?= esc($header->getName(), 'html') ?></td>
289+
<td><?= esc($header->getValueLine(), 'html') ?></td>
290+
</tr>
301291
<?php endforeach; ?>
302292
</tbody>
303293
</table>
@@ -332,7 +322,7 @@
332322
</tr>
333323
</thead>
334324
<tbody>
335-
<?php foreach ($headers as $name => $value) : ?>
325+
<?php foreach ($headers as $name => $header) : ?>
336326
<tr>
337327
<td><?= esc($name, 'html') ?></td>
338328
<td><?= esc($response->getHeaderLine($name), 'html') ?></td>

0 commit comments

Comments
 (0)