1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-10 23:24:02 +02:00

Merge pull request #1394 from RoboFinance/cast-html-formatter

HtmlFormatter cast key to string in addRow
This commit is contained in:
Jordi Boggiano
2019-11-07 10:11:53 +01:00
committed by GitHub

View File

@@ -92,7 +92,7 @@ class HtmlFormatter extends NormalizerFormatter
if ($record['context']) {
$embeddedTable = '<table cellspacing="1" width="100%">';
foreach ($record['context'] as $key => $value) {
$embeddedTable .= $this->addRow($key, $this->convertToString($value));
$embeddedTable .= $this->addRow((string)$key, $this->convertToString($value));
}
$embeddedTable .= '</table>';
$output .= $this->addRow('Context', $embeddedTable, false);
@@ -100,7 +100,7 @@ class HtmlFormatter extends NormalizerFormatter
if ($record['extra']) {
$embeddedTable = '<table cellspacing="1" width="100%">';
foreach ($record['extra'] as $key => $value) {
$embeddedTable .= $this->addRow($key, $this->convertToString($value));
$embeddedTable .= $this->addRow((string)$key, $this->convertToString($value));
}
$embeddedTable .= '</table>';
$output .= $this->addRow('Extra', $embeddedTable, false);