mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-28 15:29:52 +02:00
Make SlackRecord::stringify() work without a line formatter
This commit is contained in:
@@ -216,10 +216,14 @@ class SlackRecord
|
||||
* Stringifies an array of key/value pairs to be used in attachment fields
|
||||
*
|
||||
* @param array $fields
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function stringify($fields)
|
||||
{
|
||||
if (!$this->lineFormatter) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$string = '';
|
||||
foreach ($fields as $var => $val) {
|
||||
$string .= $var.': '.$this->lineFormatter->stringify($val)." | ";
|
||||
|
Reference in New Issue
Block a user